Parameter value notation 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 the parameter value pattern I can get what %d{yyyy-MM-dd HH:mm:ss}

some date format specifier stands for, but I want to know about other patterns like what %-5p

, %c{1}:%L

etc. means?

+3


source to share


1 answer


Ditch the log4j template template



+1


source







All Articles