Skip to content

Commit 4ed3aeb

Browse files
committed
Log4JXmlEventLayout - Added IncludeCallSite + IncludeSourceInfo
1 parent 18309ac commit 4ed3aeb

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/NLog/Layouts/Log4JXmlEventLayout.cs

+20
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,26 @@ public bool IncludeNdlc
126126
}
127127
#endif
128128

129+
/// <summary>
130+
/// Gets or sets a value indicating whether to include call site (class and method name) in the information sent over the network.
131+
/// </summary>
132+
/// <docgen category='Payload Options' order='10' />
133+
public bool IncludeCallSite
134+
{
135+
get => Renderer.IncludeCallSite;
136+
set => Renderer.IncludeCallSite = value;
137+
}
138+
139+
/// <summary>
140+
/// Gets or sets a value indicating whether to include source info (file name and line number) in the information sent over the network.
141+
/// </summary>
142+
/// <docgen category='Payload Options' order='10' />
143+
public bool IncludeSourceInfo
144+
{
145+
get => Renderer.IncludeSourceInfo;
146+
set => Renderer.IncludeSourceInfo = value;
147+
}
148+
129149
internal override void PrecalculateBuilder(LogEventInfo logEvent, StringBuilder target)
130150
{
131151
PrecalculateBuilderInternal(logEvent, target);

0 commit comments

Comments
 (0)