diff --git a/src/NLog.Targets.Fluentd/Fluentd.cs b/src/NLog.Targets.Fluentd/Fluentd.cs index bdb56fc..0355ebf 100644 --- a/src/NLog.Targets.Fluentd/Fluentd.cs +++ b/src/NLog.Targets.Fluentd/Fluentd.cs @@ -121,7 +121,7 @@ protected void UnpackTo(Unpacker unpacker, IList array, long arrayLength } } - public void UnpackTo(Unpacker unpacker, IDictionary collection) + public new void UnpackTo(Unpacker unpacker, IDictionary collection) { long mapLength; if (!unpacker.ReadMapLength(out mapLength)) @@ -143,7 +143,7 @@ protected override IDictionary UnpackFromCore(Unpacker unpacker) return retval; } - public void UnpackTo(Unpacker unpacker, object collection) + public new void UnpackTo(Unpacker unpacker, object collection) { var dictionary = collection as IDictionary; if (dictionary == null) @@ -246,6 +246,7 @@ 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.emitter = new FluentdEmitter(this.stream); @@ -309,7 +310,7 @@ protected override void Write(LogEventInfo logEvent) } record.Add("stacktrace", transcodedFrames); } - if (this.IncludeAllProperties && logEvent.Properties.Count > 0) + if (this.IncludeAllProperties && logEvent.HasProperties) { foreach (var property in logEvent.Properties) { @@ -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..0f81abf 100644 --- a/src/NLog.Targets.Fluentd/NLog.Targets.Fluentd.csproj +++ b/src/NLog.Targets.Fluentd/NLog.Targets.Fluentd.csproj @@ -22,18 +22,14 @@ true + + + + + - - - - - - - - -