Last modified 2 years ago
Log4J Config Sample
- Kraken will use default logging if log4j.properties configuration not found.
- Default configuration enables console and daily rolling file appenders.
$ java -jar kraken-core-1.4.2-package.jar [2010-04-19 20:40:12,543] INFO (Kraken) - Default logging enabled. Configure log4j.properties file for custom logging. [2010-04-19 20:40:12,743] INFO (Kraken) - Booting Kraken. [2010-04-19 20:40:12,754] INFO (BundleConfig) - initailizing bundle config schema. [2010-04-19 20:40:13,481] INFO (Kraken) - Console localhost/127.0.0.1:7004 opened. [2010-04-19 20:40:13,482] INFO (Kraken) - Kraken started.
- Default configuration enables console and daily rolling file appenders.
- Create log4j.properties config file for custom logging
log4j.rootLogger = DEBUG, stdout, dailyfile log4j.appender.stdout = org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout = org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=[%d] %5p (%t) - %m%n log4j.appender.dailyfile.Threshold = DEBUG log4j.appender.dailyfile = org.apache.log4j.DailyRollingFileAppender log4j.appender.dailyfile.File = kraken.log log4j.appender.dailyfile.layout = org.apache.log4j.PatternLayout log4j.appender.dailyfile.layout.ConversionPattern=[%d] %5p (%t) - %m%n
