Skip to content

Commit

Permalink
Added InternalLogger for connection attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
snakefoot committed Apr 1, 2018
1 parent 497a3be commit a20f79a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/NLog.Targets.Fluentd/Fluentd.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,9 @@ protected void EnsureConnected()

private void ConnectClient()
{
NLog.Common.InternalLogger.Debug("Fluentd Connecting to {0}:{1}", this.Host, this.Port);
this.client.Connect(this.Host, this.Port);
this.stream = this.client.GetStream();
this.stream = new BufferedStream(this.client.GetStream());
this.emitter = new FluentdEmitter(this.stream);
}

Expand Down Expand Up @@ -344,7 +345,7 @@ protected override void Write(LogEventInfo logEvent)

private static object SerializePropertyValue(string propertyKey, object propertyValue)
{
if (propertyValue == null || Convert.GetTypeCode(propertyValue) != TypeCode.Object || propertyValue is decimal)
if (propertyValue == null || Convert.GetTypeCode(propertyValue) != TypeCode.Object)
{
return propertyValue; // immutable
}
Expand Down
2 changes: 1 addition & 1 deletion src/NLog.Targets.Fluentd/NLog.Targets.Fluentd.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="MsgPack.Cli" Version="0.9.2" />
<PackageReference Include="NLog" Version="4.5.0-rc03" />
<PackageReference Include="NLog" Version="4.5.0" />
</ItemGroup>


Expand Down

0 comments on commit a20f79a

Please sign in to comment.