MooX-Role-Chatty
view release on metacpan or search on metacpan
labelling your logging calls by name, you can also call "logger" to get
at the logging engine, on which you can call any of the logging methods
it supports.
MANAGING LOGGERS
MooX::Role::Chatty tries to make the common cases easy. To that end, you
don't need to worry about setting up "logger" if you don't want to. If
you haven't explicitly set this attribute, the first time you need it
(by calling "logger" or "remark") a default logger will be instantiated
for you. This logger is a Log::Any::Proxy, so you can call any of the
methods supported by Log::Any to generate messages. A corollary of this
behavior is that you have to have Log::Any installed, or a fatal error
occurs.
A brief timestamp is prepended to each line of the message. The logger
is connected to a Log::Any::Adapter::Carp adapter that passes on logged
messages but suppresses file/line information. The result is that log
messages are sent to STDERR, though you can redirect them via
$SIG{__WARN__} if you want.
The "verbose" attribute determines the level of logging: a level of 1
lib/MooX/Role/Chatty.pm view on Meta::CPAN
you can call any of the logging methods it supports.
=head2 MANAGING LOGGERS
L<MooX::Role::Chatty> tries to make the common cases easy. To that
end, you don't need to worry about setting up L</logger> if you don't
want to. If you haven't explicitly set this attribute, the first time
you need it (by calling L</logger> or L</remark>) a default logger
will be instantiated for you. This logger is a L<Log::Any::Proxy>, so
you can call any of the methods supported by L<Log::Any> to generate
messages. A corollary of this behavior is that you have to have
L<Log::Any> installed, or a fatal error occurs.
A brief timestamp is prepended to each line of the message. The
logger is connected to a L<Log::Any::Adapter::Carp> adapter that passes
on logged messages but suppresses file/line information. The result
is that log messages are sent to F<STDERR>, though you can redirect
them via C<$SIG{__WARN__}> if you want.
The L</verbose> attribute determines the level of logging: a
level of C<1> corresponds to a log level of C<notice>, C<2> to
( run in 0.277 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )