[Dancer-users] Logging and "info"

Puneet Kishor punk.kish at gmail.com
Tue Mar 27 21:46:57 CEST 2012


My reading of this thread leans toward what I think was Ovid's intent -- "debug", "warn", "warning", and "error" proclaim something about the application, the code. While "info" is intended for the business logic, the function that the application is performing.


On Mar 27, 2012, at 2:36 PM, damien krotkine wrote:

> I agree with Flavio : imho, INFO should not be at weight 4, but between
> debug and warn.
> 
> 
> On 27 March 2012 21:31, Flavio Poletti <polettix at gmail.com> wrote:
> 
>> On Tue, Mar 27, 2012 at 4:37 PM, Ovid <curtis_ovid_poe at yahoo.com> wrote:
>> 
>>> Pull request submitted:
>>> https://github.com/sukria/Dancer/pull/765
>>> 
>>> The only open question is this bit in Dancer::Logger::Abstract:
>>> 
>>>    my $levels = {
>>> 
>>>        # levels < 0 are for core only
>>>        core => -10,
>>> 
>>>        # levels > 0 are for end-users only
>>>        debug   => 1,
>>>        warn    => 2,
>>>        warning => 2,
>>>        error   => 3,
>>>        info    => 4,
>>>    };
>>> 
>> 
>> The meaning of "info" in Log::Log4perl is something between a debug
>> message and a warning, so it should have weight 1.5 in the table above (if
>> it makes sense, of course). I'm not telling that this is the way to go,
>> just that a well established module in the Perl ecosystem assigns a
>> different semantic to the info log level and this might lead to confusion.
>> 
>> Just to do some blatant self-promotion, if you need additional log levels
>> you can take a look at Dancer::Logger::Log4perl and use e.g.
>> Log::Log4perl's methods provided with the :easy mode of operation (i.e.
>> TRACE/DEBUG/INFO/WARN/ERROR/FATAL/ALWAYS, the last being probably what you
>> mean by "info").
>> 
>> Regards,
>> 
>>   Flavio.
>> 





More information about the Dancer-users mailing list