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>
    

      

  • 相关阅读:
    js正则匹配
    包含HTML的字符串去掉HTML标签
    smart-table 服务端请求真分
    禁用H5 表单验证novalidate
    webpack
    linux 进程查看及杀死进程
    配置ca服务器和http,mail加密
    mysql权限
    mysql查询
    mysql储存引擎
  • 原文地址:https://www.cnblogs.com/q4486233/p/6382669.html
Copyright © 2011-2022 走看看