Skip to content

Commit

Permalink
ProcessIdLayoutRenderer - Can also benefit from AppendInvariant
Browse files Browse the repository at this point in the history
  • Loading branch information
snakefoot committed Oct 9, 2016
1 parent c3e3681 commit c5d8791
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/NLog/LayoutRenderers/CounterLayoutRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ protected override void Append(StringBuilder builder, LogEventInfo logEvent)
this.Value += this.Increment;
}

builder.Append(v.ToString(CultureInfo.InvariantCulture));
Internal.StringBuilderExt.AppendInvariant(builder, v);
}

private static int GetNextSequenceValue(string sequenceName, int defaultValue, int increment)
Expand Down
3 changes: 1 addition & 2 deletions src/NLog/LayoutRenderers/ProcessIdLayoutRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

namespace NLog.LayoutRenderers
{
using System.Globalization;
using System.Text;
using NLog.Config;
using NLog.Internal;
Expand All @@ -55,7 +54,7 @@ public class ProcessIdLayoutRenderer : LayoutRenderer
/// <param name="logEvent">Logging event.</param>
protected override void Append(StringBuilder builder, LogEventInfo logEvent)
{
builder.Append(ThreadIDHelper.Instance.CurrentProcessID.ToString(CultureInfo.InvariantCulture));
builder.AppendInvariant(ThreadIDHelper.Instance.CurrentProcessID);
}
}
}
Expand Down
1 change: 0 additions & 1 deletion src/NLog/LayoutRenderers/ThreadIdLayoutRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

namespace NLog.LayoutRenderers
{
using System.Globalization;
using System.Text;
using System.Threading;

Expand Down

0 comments on commit c5d8791

Please sign in to comment.