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>
    

      

  • 相关阅读:
    bzoj4537: [Hnoi2016]最小公倍数
    bzoj4331: JSOI2012 越狱老虎桥
    bzoj4558: [JLoi2016]方
    bzoj4209: 西瓜王
    bzoj2653: middle
    bzoj4671: 异或图
    bzoj4771: 七彩树
    shell java应用启动脚本(app.sh)
    Springboot 构建http服务,返回的http行是'HTTP/1.1 200' 无状态码描述 客户端解析错误
    MariaDB(Mysql)-主从搭建
  • 原文地址:https://www.cnblogs.com/q4486233/p/6382669.html
Copyright © 2011-2022 走看看