zoukankan      html  css  js  c++  java
  • NLog基础配置

    <?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"
          autoReload="true"
          internalLogLevel="Warn"
          internalLogFile="internal-nlog.txt">
    
      <!-- define various log targets -->
      <targets>
        <!-- write logs to file -->
        <target xsi:type="File" name="web-post" fileName="D:logslogapiPOSTux-${shortdate}.log" layout="${message}"  >
          <header>#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken</header>
        </target>
    
        <target xsi:type="File" name="web-get" fileName="D:logslogapiW3SVC7ux-${shortdate}.log" layout="${message}" >
          <header>#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken</header>
        </target>
    
        <target xsi:type="File" name="allfile" fileName="D:logslogapi
    log-${shortdate}.log"
                layout="${longdate}|${logger}|${uppercase:${level}}|  ${message} ${exception}"  >
        </target>
      </targets>
    
      <rules>
        <logger name="web-post" minlevel="Trace" writeTo="web-post" />
        <logger name="web-get" minlevel="Trace" writeTo="web-get" />
        <!--All logs, including from Microsoft-->
        <logger name="allfile" minlevel="Trace" writeTo="allfile" />
      </rules>
    </nlog>
    

      

  • 相关阅读:
    node03- FS内置模块
    node03- CommonJS
    删除当前目录下的所有文件夹和文件
    解决 idea 项目中Error:java: 无效的标记
    Raid0,Raid1,Raid5,Raid10 总结
    Tcpdump命令
    ClassNotFoundException 和 NoClassDefFoundError 区别
    Dart-List里面常用的属性和方法
    CSS实现等分布局的4种方式
    iOS项目添加CocoaPods
  • 原文地址:https://www.cnblogs.com/q4486233/p/6382669.html
Copyright © 2011-2022 走看看