Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 44490be

Browse files
authored
Merge pull request DataDog#14594 from DataDog/olivielpeau/log4net-utf8
Specify utf-8 encoding without BOM explicitly in log4net config
2 parents 0210328 + 9f788a2 commit 44490be

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

content/en/logs/log_collection/csharp.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,10 @@ Once the library is installed, attach the following layout to any target. Edit t
198198
<appender-ref ref="JsonFileAppender" />
199199
</root>
200200
<appender name="JsonFileAppender" type="log4net.Appender.FileAppender">
201-
<threshold value="DEBUG"/>
202-
<file value="application-logs.json" />
203-
<appendToFile value="true" />
201+
<threshold value="DEBUG"/>
202+
<file value="application-logs.json" />
203+
<encoding type="System.Text.UTF8Encoding" />
204+
<appendToFile value="true" />
204205
<layout type="log4net.Layout.SerializedLayout, log4net.Ext.Json">
205206
<decorator type="log4net.Layout.Decorators.StandardTypesDecorator, log4net.Ext.Json" />
206207
<default />

0 commit comments

Comments
 (0)