GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Jifty::Manual::Logging(3) User Contributed Perl Documentation Jifty::Manual::Logging(3)

Jifty::Manual::Logging - Using and controlling Jifty's logging system

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.

Various log level config can be set from etc/config.yml or etc/site_config.yml.

    # vim:filetype=conf:et:
    log4perl.rootLogger = INFO , Screen
    log4perl.logger.MyApp.MailNotifier = WARN, Mailer

    log4perl.appender.LOG1 = Log::Log4perl::Appender::File
    log4perl.appender.LOG1.filename  = apache_fastcgi/logs/
    log4perl.appender.LOG1.mode      = append
    log4perl.appender.LOG1.layout    = Log::Log4perl::Layout::PatternLayout
    log4perl.appender.LOG1.layout.ConversionPattern = %d %p %m %n

    log4perl.appender.Mailer         = Log::Dispatch::Email::MailSend
    log4perl.appender.Mailer.to      = admin@blah.com
    log4perl.appender.Mailer.subject = !!ERROR!!
    log4perl.appender.Mailer.layout  = SimpleLayout

    log4perl.filter.Filter1 = sub { /Plugin/ }
    log4perl.filter.FilterRule       = Log::Log4perl::Filter::Boolean
    log4perl.filter.FilterRule.logic = Filter1
    log4perl.appender.LOG1.Filter    = FilterRule

    log4perl.appender.ScreenColor  = Log::Log4perl::Appender::ScreenColoredLevels
    log4perl.appender.ScreenColor.layout = SimpleLayout

    log4perl.appender.Screen   = Log::Log4perl::Appender::Screen
    log4perl.appender.Screen.layout = SimpleLayout
2013-01-29 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.