首页 > 其他 > 详细

nlog配置文件

时间:2017-09-29 09:26:23      阅读:329      评论:0      收藏:0      [点我收藏+]

文件名 nlog.config

内容如下:

<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
  <targets async="true" maxarchivefiles="2">
    <target  name="log_file" xsi:type="File"  fileName="${basedir}/logs/${date:format=yyyyMMdd}.log"
            layout="[============================${newline}${date} ${appdomain}  ${logger} ${level}${newline}${message}${newline}${exception}]"/>
  </targets>
  <rules>
    <logger name="*" minlevel="trace"  writeTo="log_file"></logger>
  </rules>
</nlog>

nlog配置文件

原文:http://www.cnblogs.com/iframe/p/7609380.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!