zoukankan      html  css  js  c++  java
  • LogBack,升级版的log4J

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

    <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

    <appender name="LOG-ALL" class="org.apache.log4j.DailyRollingFileAppender">
    <param name="DatePattern" value="'.'yyyy-MM-dd"/>
    <param name="file" value="${logpath}/all.log"/>
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="[%d{yyyy-MM-dd HH:mm:ss}] %6p - %30.30c - %m "/>
    </layout>
    </appender>

    <appender name="LOG-CONFIG" class="org.apache.log4j.DailyRollingFileAppender">
    <param name="DatePattern" value="'.'yyyy-MM-dd"/>
    <param name="file" value="${logpath}/config.log"/>
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="[%d{yyyy-MM-dd HH:mm:ss}] %6p - %30.30c - %m "/>
    </layout>
    </appender>

    <category name="com.vh.app.server.vgb.controller.config" additivity="false">
    <priority value="${loglevel}" />
    <appender-ref ref="LOG-CONFIG" />
    </category>

    <appender name="LOG-MONITOR" class="org.apache.log4j.DailyRollingFileAppender">
    <param name="DatePattern" value="'.'yyyy-MM-dd"/>
    <param name="file" value="${logpath}/monitor.log"/>
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="[%d{yyyy-MM-dd HH:mm:ss}] %6p - %30.30c - %m "/>
    </layout>
    </appender>

    <category name="com.vh.app.server.vgb.check" additivity="false">
    <priority value="${loglevel}" />
    <appender-ref ref="LOG-MONITOR" />
    </category>

    <appender name="LOG-WORKFLOW" class="org.apache.log4j.DailyRollingFileAppender">
    <param name="DatePattern" value="'.'yyyy-MM-dd"/>
    <param name="file" value="${logpath}/workflow.log"/>
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="[%d{yyyy-MM-dd HH:mm:ss}] %6p - %30.30c - %m "/>
    </layout>
    </appender>

    <category name="com.vh.app.server.vgb.service.flow" additivity="false">
    <priority value="${loglevel}" />
    <appender-ref ref="LOG-WORKFLOW" />
    </category>

    <root>
    <priority value="${loglevel}"/>
    <appender-ref ref="LOG-ALL"/>
    </root>
    </log4j:configuration>

  • 相关阅读:
    inetinfo
    常用的IIS命令
    asp.net
    WAS与w3svc
    服务和进程的关系
    w3svc
    link
    RAC动态资源(DRM)管理介绍
    RMAN内部原理介绍
    在32位的linux平台上为Oracle配置>1.7GB的SGA
  • 原文地址:https://www.cnblogs.com/gstsyyb/p/5976476.html
Copyright © 2011-2022 走看看