Name: log4jConfiguration.propertiesreturn
Possible keys:
Property Name Property Value log4j.rootCategory <level> , <appenderName> log4j.Category.<device> <level> , <appenderName> log4j.appender.<appenderName> org.apache.log4j.<appenderType> log4j.appender.<appenderName>.File 1 <fileName> log4j.appender.<appenderName>.MaxFileSize 2 <size>KB log4j.appender.<appenderName>.MaxBackupIndex3 <backups> log4j.appender.<appenderName>.layout org.apache.log4j.<layoutType> log4j.appender.<appenderName>.layout.ConversionPattern4 <conversion> Explanation of each property
log4j.rootCategory = The main category of logging
log4j.Category.<device> = The rest of the categories should follow this format.
log4j.appender.<appenderName> = This property is used to define the type of the appender
<level> = ALL | DEBUG | INFO | WARN | ERROR | FATAL
<appenderName> = A name for this appender
<appenderType> = org.apache.log4j.ConsoleAppender |
org.apache.log4j.RollingFileAppender |
org.apache.log4j.FileAppender<fileName> = The file's name that will be asociated with this appender
<size> = The amount of KB (integer)
<backups> = The amount of backups (integer)
<layoutType> = The layout type. e.g. org.apache.log4j.PatternLayout
(see http://jakarta.apache.org/log4j/jakarta-log4j-1.1.3/docs/manual.html for a better explanation on the layout types)<conversion> = Determines the way the data will be displayed in.
The conversion pattern is closely related to the conversion pattern of the printf
function in C. A conversion pattern is composed of literal text and format
control expressions called conversion specifiers.
1 This property is needed only when the <appenderType> of <appenderName> is defined as a
FileAppender. See definition of property log4j.appender.<appenderName>.
Absolute Paths are required.2 This property is optional and should be used only when <appenderName> is defined as a FileAppender
3 Define (optionally) this property only if <appenderName> is defined as a RollingFileAppender.
4 This property is required only if <layoutType> is defined as a PatternLayout
Note: in recent versions of log4j the name "level" has been changed to "priority"