Skip to content

Commit a20f79a

Browse files
committed
Added InternalLogger for connection attempt
1 parent 497a3be commit a20f79a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/NLog.Targets.Fluentd/Fluentd.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,9 @@ protected void EnsureConnected()
246246

247247
private void ConnectClient()
248248
{
249+
NLog.Common.InternalLogger.Debug("Fluentd Connecting to {0}:{1}", this.Host, this.Port);
249250
this.client.Connect(this.Host, this.Port);
250-
this.stream = this.client.GetStream();
251+
this.stream = new BufferedStream(this.client.GetStream());
251252
this.emitter = new FluentdEmitter(this.stream);
252253
}
253254

@@ -344,7 +345,7 @@ protected override void Write(LogEventInfo logEvent)
344345

345346
private static object SerializePropertyValue(string propertyKey, object propertyValue)
346347
{
347-
if (propertyValue == null || Convert.GetTypeCode(propertyValue) != TypeCode.Object || propertyValue is decimal)
348+
if (propertyValue == null || Convert.GetTypeCode(propertyValue) != TypeCode.Object)
348349
{
349350
return propertyValue; // immutable
350351
}

src/NLog.Targets.Fluentd/NLog.Targets.Fluentd.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

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

3838

0 commit comments

Comments
 (0)