Hi,
thanks for reporting.
Log::Log4perl::Tiny tries to mimic the great Log::Log4perl as much as
possible:
$ perl -I epan/local/lib/perl5/ -MLog::Log4perl -E 'say
$Log::Log4perl::VERSION'
1.46
$ perl -I epan/local/lib/perl5/ -MLog::Log4perl=:easy -E '
Log::Log4perl->easy_init({level=>$INFO,layout=>"[%p] %m%n"});
INFO "ciao";
ALWAYS "always"
'
[INFO] ciao
[OFF] always
The following also appears in Log::Log4perl documentation: "If a message
should never be blocked, regardless of the log level, use the ALWAYS function
which corresponds to a log level of OFF"
We can as the original author about it, but as I see it there is this
additional level "OFF" that basically sets the logging off. Except that you
might want to print something anyway, but calling the stealth logger "OFF"
might be somehow counter-intuitive, so he came up with "ALWAYS" that does a
better job at hinting what it does.
I can agree that the string rendition would probably be better spelt as
"ALWAYS" instead. In this spirit, I can try to think about an option that,
when set, will simply change that string from "OFF" to "ALWAYS", provided
that the default behavior remains consistent with Log::Log4perl (i.e. the
new option would be opt-in and not the new default). Let me know your
thoughts.
Ciao,
Flavio.
2015-07-20 2:37 GMT+02:00 F. Li via RT <bug-Log-Log4perl-Tiny@rt.cpan.org>:
Show quoted text> Sun Jul 19 20:37:18 2015: Request 105950 was acted upon.
> Transaction: Ticket created by li.hansen.inc@gmail.com
> Queue: Log-Log4perl-Tiny
> Subject: Possible bug?
> Broken in: (no value)
> Severity: (no value)
> Owner: Nobody
> Requestors: li.hansen.inc@gmail.com
> Status: new
> Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=105950 >
>
>
> Tried ALWAYS but it comes back marked OFF. Shouldn't it be "ALWAYS"?
>
> Microsoft Windows [Version 6.3.9600]
> (c) 2013 Microsoft Corporation. All rights reserved.
>
> C:\Users\Felix>cpanm Log::Log4perl::Tiny
> Log::Log4perl::Tiny is up to date. (1.2.7)
>
> C:\Users\Felix>perl -MLog::Log4perl::Tiny=:easy -e "ALWAYS 'always'"
> [2015/07/19 19:32:08] [* OFF*] always
>
> C:\Users\Felix>
>
>