Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log4JXmlEventLayout - Added IncludeCallSite + IncludeSourceInfo #3442

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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