From a20f79a391bac0994833622b8cef7172dec940c6 Mon Sep 17 00:00:00 2001 From: Rolf Kristensen Date: Sat, 17 Mar 2018 15:22:35 +0100 Subject: [PATCH] Added InternalLogger for connection attempt --- src/NLog.Targets.Fluentd/Fluentd.cs | 5 +++-- src/NLog.Targets.Fluentd/NLog.Targets.Fluentd.csproj | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/NLog.Targets.Fluentd/Fluentd.cs b/src/NLog.Targets.Fluentd/Fluentd.cs index bdb56fc..4645810 100644 --- a/src/NLog.Targets.Fluentd/Fluentd.cs +++ b/src/NLog.Targets.Fluentd/Fluentd.cs @@ -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); } @@ -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 } diff --git a/src/NLog.Targets.Fluentd/NLog.Targets.Fluentd.csproj b/src/NLog.Targets.Fluentd/NLog.Targets.Fluentd.csproj index 1ad2a36..d1a1499 100644 --- a/src/NLog.Targets.Fluentd/NLog.Targets.Fluentd.csproj +++ b/src/NLog.Targets.Fluentd/NLog.Targets.Fluentd.csproj @@ -32,7 +32,7 @@ - +