From a1f75a8d49c15b5cc312966364b753dd3dbe06e2 Mon Sep 17 00:00:00 2001 From: Rolf Kristensen Date: Thu, 30 May 2019 11:40:39 +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 351c80a632..2811ef670d 100644 --- a/src/NLog/Layouts/Log4JXmlEventLayout.cs +++ b/src/NLog/Layouts/Log4JXmlEventLayout.cs @@ -114,6 +114,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; + } + /// /// Gets or sets the log4j:event logger-xml-attribute (Default ${logger}) ///