[Dancer-users] Logging and "info"

Ovid curtis_ovid_poe at yahoo.com
Tue Mar 27 13:05:01 CEST 2012


Hi all,

I noticed that when I'm trying to log information, I have several log levels (core() apparently reserved for the core, as one might expect):

* debug
* warning
* error
 
I have a case where I would like to log informational data that is neither a warning or error. However, I don't want to log it as debug because I still want this logged in production.

I propose adding an "info" log level that has a log level of 4 and thus should always be logged if logging is enabled. It would behave like other log levels:

    info "All bid requests were denied for auction $auction_id";

Does this make sense or am I missing something obvious?

Here are the log levels from Log::Log4perl (http://search.cpan.org/~mschilli/Log-Log4perl-1.36/lib/Log/Log4perl.pm#Log_Levels)

    $logger->trace("...");  # Log a trace message
    $logger->debug("...");  # Log a debug message
    $logger->info("...");   # Log a info message
    $logger->warn("...");   # Log a warn message
    $logger->error("...");  # Log a error message
    $logger->fatal("...");  # Log a fatal message

Cheers,
Ovid
--
Live and work overseas - http://overseas-exile.blogspot.com/
Buy the book           - http://www.oreilly.com/catalog/perlhks/
Tech blog              - http://blogs.perl.org/users/ovid/
Twitter                - http://twitter.com/OvidPerl/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20120327/3776bcf8/attachment.htm>


More information about the Dancer-users mailing list