From 334e572560a36f740e66cb1fd8b6d785609af77c Mon Sep 17 00:00:00 2001 From: Rolf Kristensen Date: Thu, 30 May 2019 12:27:05 +0200 Subject: [PATCH] Log4JXmlEventLayout - Added IncludeCallSite + IncludeSourceInfo --- src/NLog/Layouts/Log4JXmlEventLayout.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/NLog/Layouts/Log4JXmlEventLayout.cs b/src/NLog/Layouts/Log4JXmlEventLayout.cs index 83c06b47e0..7e073ce52a 100644 --- a/src/NLog/Layouts/Log4JXmlEventLayout.cs +++ b/src/NLog/Layouts/Log4JXmlEventLayout.cs @@ -126,6 +126,26 @@ public bool IncludeNdlc } #endif + /// + /// Gets or sets a value indicating whether to include call site (class and method name) in the information sent over the network. + /// + /// + public bool IncludeCallSite + { + get => Renderer.IncludeCallSite; + set => Renderer.IncludeCallSite = value; + } + + /// + /// Gets or sets a value indicating whether to include source info (file name and line number) in the information sent over the network. + /// + /// + public bool IncludeSourceInfo + { + get => Renderer.IncludeSourceInfo; + set => Renderer.IncludeSourceInfo = value; + } + internal override void PrecalculateBuilder(LogEventInfo logEvent, StringBuilder target) { PrecalculateBuilderInternal(logEvent, target);