Skip to content

Commit

Permalink
Merge pull request #2067 from snakefoot/LayoutRenderThreadAgnostic
Browse files Browse the repository at this point in the history
${EventProperties}, ${newline}, ${basedir} & ${tempdir} as ThreadAgnostic
  • Loading branch information
304NotModified committed Apr 24, 2017
2 parents 4ccf349 + f102aca commit 44154cc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/NLog/LayoutRenderers/BaseDirLayoutRenderer.cs
Expand Up @@ -45,6 +45,7 @@ namespace NLog.LayoutRenderers
/// </summary>
[LayoutRenderer("basedir")]
[AppDomainFixedOutput]
[ThreadAgnostic]
public class BaseDirLayoutRenderer : LayoutRenderer
{
private string baseDir;
Expand Down
4 changes: 2 additions & 2 deletions src/NLog/LayoutRenderers/EventPropertiesLayoutRenderer.cs
Expand Up @@ -31,19 +31,19 @@
// THE POSSIBILITY OF SUCH DAMAGE.
//

using NLog.Internal;

namespace NLog.LayoutRenderers
{
using System;
using System.Globalization;
using System.Text;
using NLog.Config;
using NLog.Internal;

/// <summary>
/// Log event context data. See <see cref="LogEventInfo.Properties"/>.
/// </summary>
[LayoutRenderer("event-properties")]
[ThreadAgnostic]
public class EventPropertiesLayoutRenderer : LayoutRenderer
{
/// <summary>
Expand Down
3 changes: 2 additions & 1 deletion src/NLog/LayoutRenderers/NewLineLayoutRenderer.cs
Expand Up @@ -34,14 +34,15 @@
namespace NLog.LayoutRenderers
{
using System;
using System.Diagnostics;
using System.Text;
using NLog.Internal;
using NLog.Config;

/// <summary>
/// A newline literal.
/// </summary>
[LayoutRenderer("newline")]
[ThreadAgnostic]
public class NewLineLayoutRenderer : LayoutRenderer
{
/// <summary>
Expand Down
1 change: 1 addition & 0 deletions src/NLog/LayoutRenderers/TempDirLayoutRenderer.cs
Expand Up @@ -44,6 +44,7 @@ namespace NLog.LayoutRenderers
/// </summary>
[LayoutRenderer("tempdir")]
[AppDomainFixedOutput]
[ThreadAgnostic]
public class TempDirLayoutRenderer : LayoutRenderer
{
private static string tempDir = Path.GetTempPath();
Expand Down

0 comments on commit 44154cc

Please sign in to comment.