Skip to content

Commit

Permalink
Log4JXmlEventLayout - Added IncludeCallSite + IncludeSourceInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
snakefoot committed May 30, 2019
1 parent 18309ac commit 4ed3aeb
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/NLog/Layouts/Log4JXmlEventLayout.cs
Expand Up @@ -126,6 +126,26 @@ public bool IncludeNdlc
}
#endif

/// <summary>
/// Gets or sets a value indicating whether to include call site (class and method name) in the information sent over the network.
/// </summary>
/// <docgen category='Payload Options' order='10' />
public bool IncludeCallSite
{
get => Renderer.IncludeCallSite;
set => Renderer.IncludeCallSite = value;
}

/// <summary>
/// Gets or sets a value indicating whether to include source info (file name and line number) in the information sent over the network.
/// </summary>
/// <docgen category='Payload Options' order='10' />
public bool IncludeSourceInfo
{
get => Renderer.IncludeSourceInfo;
set => Renderer.IncludeSourceInfo = value;
}

internal override void PrecalculateBuilder(LogEventInfo logEvent, StringBuilder target)
{
PrecalculateBuilderInternal(logEvent, target);
Expand Down

0 comments on commit 4ed3aeb

Please sign in to comment.