# Log4Net中配置目录问题

0
[已解决问题] 解决于 2016-11-19 12:44

MSky | 菜鸟二级 | 园豆：436

0

http://logging.apache.org/log4net/release/config-examples.html

```<appender name="FileAppender" type="log4net.Appender.FileAppender">
<file value="\${TMP}\log-file.txt" />
<appendToFile value="true" />
<encoding value="unicodeFFFE" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
</layout>
</appender>```

This example shows how to configure the file name to write to using an environment variable TMP. The encoding to use to write to the file is also specified.

hahanonym | 小虾三级 |园豆：1460 | 2016-11-15 09:51

您需要登录以后才能回答，未注册用户请先注册