All Downloads are FREE. Search and download functionalities are using the official Maven repository.

fniliu.common-lang.1.2.source-code.log4j2.xml Maven / Gradle / Ivy

There is a newer version: 1.3
Show newest version
<?xml version="1.0" encoding="UTF-8" ?>
<Configuration>
    <!-- 输出日志到控制台  ConsoleAppender -->
    <Properties>
        <!--申明全局别名,下面可以直接使用-->
        <Property name="APP_Name">common-lang</Property>
        <Property name="log.dir">D:/temp/logs/cpf-project</Property>
    </Properties>

    <Appenders>
        <!--这个输出控制台的配置,这里输出除了warn和error级别的信息到System.out -->
        <Console name="console_out_appender" target="SYSTEM_OUT">
            <ThresholdFilter level="DEBUG" onMatch="ACCEPT" onMismatch="DENY" />
            <!-- 输出日志的格式 -->
            <PatternLayout pattern="[%p] [web-boot] %d{yyyy-MM-dd HH:mm:ss} (%F:%L) %m%n" />
        </Console>
    </Appenders>

    <!-- 控制某包下面的日志输出级别,只有大于等于这个级别才会输出 -->
    <Loggers>
        <Logger name="com.github.sinjar.common" level="DEBUG"/>

        <Root level="DEBUG">
            <AppenderRef ref="console_out_appender" />
        </Root>
    </Loggers>

</Configuration>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy