码迷,mamicode.com
首页 > 数据库 > 详细

quartz关闭DBUG日志

时间:2019-09-05 13:40:52      阅读:112      评论:0      收藏:0      [点我收藏+]

标签:blackhole   调试   coding   code   格式   rop   inter   project   enc   

引用了Quartz组件后,打印日志时,整天都有相应的调试信息打印出来,严重影响了查找日志效率,谷歌一番后,修改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="Info"
      internalLogFile="internal-nlog.txt">

  <!-- 日志输出目标 -->
  <targets>
    <!-- 打印自身日志(含asp.net core请求组件格式化) -->
    <target xsi:type="File" name="comLog" fileName="Log/log-${shortdate}.log"
            layout="${longdate}|${event-properties:item=EventId_Id}|${uppercase:${level}}|${logger}|${message} ${exception:format=tostring}|url: ${aspnet-request-url}|action: ${aspnet-mvc-action}" />
  </targets>

  <!-- 日志规则 -->
  <rules>
    <!-- Quartz -->
    <logger name="Quartz*" minlevel="Trace" maxlevel="Info" final="true" />
    <!-- BlackHole without writeTo -->
    <logger name="*" minlevel="Trace" writeTo="comLog" />
  </rules>
</nlog>

quartz关闭DBUG日志

标签:blackhole   调试   coding   code   格式   rop   inter   project   enc   

原文地址:https://www.cnblogs.com/kw13202/p/11465129.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!