by, 02-24-2012 at 08:17 PM (744 Views)
Log4J is considered to be the most frequently used library, for logging. Log4J present in your application has integration details which will be discussed in this section. A property file and system properties are used to configure Log4J.
This system property is used for specification of the Log4J configuration file naming. Default configuration file would be log4j.properties, in case it is not specified.
- log4j.rootCategory=priority [, appender]*
Default (root) logger priority is set.
Set the priority for the named logger and all loggers hierarchically lower than, or below, the named logger.logger.name corresponds to the parameter of LogFactory.getLog, used to create the logger instance. Priorities are: DEBUG, INFO, WARN,ERROR, or FATAL.
Log4J appenders corresponds with files, console, sockets and many other output devices. In case when threshold of the appender is equal to or less than message priority, it means that message has been written by appender. Different detail levels would be allowed by it to be shown at various log destinations.