简体   繁体   中英

Parameter value explanation in log4j.xml

log4j.xml

<appender name="console" class="org.apache.log4j.ConsoleAppender">
    <layout class="org.apache.log4j.PatternLayout">
        <param name="ConversionPattern" 
               value="%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n" />
    </layout>
</appender>

From parameter value pattern I can get that %d{yyyy-MM-dd HH:mm:ss} stands for some date format specifier, but I want to know about other patterns like what %-5p , %c{1}:%L , etc stands for?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM