NAME
Jifty::Manual::Logging - Using and controlling Jifty's logging system
Intro
Jifty uses the Log4perl module for logging messages, so you can define your own log4perl config for logging.
You can define different behaviour for different log levels. For example, you can send mail to administrator when error occurred, or add color to warning messages that are logged to the terminal.
Config from config.yml
Various log level config can be set from etc/config.yml or etc/site_config.yml.
Example
# vim:filetype=conf:et:log4perl.rootLogger = INFO , Screenlog4perl.logger.MyApp.MailNotifier = WARN, Mailerlog4perl.appender.LOG1 = Log::Log4perl::Appender::Filelog4perl.appender.LOG1.filename = apache_fastcgi/logs/log4perl.appender.LOG1.mode = appendlog4perl.appender.LOG1.layout = Log::Log4perl::Layout::PatternLayoutlog4perl.appender.LOG1.layout.ConversionPattern = %d %p %m %nlog4perl.appender.Mailer = Log::Dispatch::Email::MailSendlog4perl.appender.Mailer.to = [email protected]log4perl.appender.Mailer.subject = !!ERROR!!log4perl.appender.Mailer.layout = SimpleLayoutlog4perl.filter.Filter1 = sub { /Plugin/ }log4perl.filter.FilterRule = Log::Log4perl::Filter::Booleanlog4perl.filter.FilterRule.logic = Filter1log4perl.appender.LOG1.Filter = FilterRulelog4perl.appender.ScreenColor = Log::Log4perl::Appender::ScreenColoredLevelslog4perl.appender.ScreenColor.layout = SimpleLayoutlog4perl.appender.Screen = Log::Log4perl::Appender::Screenlog4perl.appender.Screen.layout = SimpleLayout