NAME

Log::ger::Manual::FAQ - FAQ on Log::ger

VERSION

version 0.006

OUTPUT

How to create multiple loggers?

For example, in Log::Any:

my $log = Log::Any->get_logger;
my $log_dump = Log::Any->get_logger(category => "dump"); # to dump contents

$log->debugf("Headers is: %s", $http_res->{headers});
$log_dump->debug($http_res->{content});

in Log::ger:

# instead of installing to package, we setup objects (or hashes) for the
# secondary loggers
my $log_dump = Log::ger->get_logger(category => "dump");

log_debug("Headers is: %s", $http_res->{headers});
$log_dump->debug($http_res->{content});

How to send logs to several outputs?

TODO

How to send debug messages to screen, but warnings/errors to file?

TODO

How to send debug messages to a file, but warnings/errors to another file?

TODO

How to log warnings/die messages?

LEVEL

How to use custom levels?

TODO

FORMAT

How to do custom formatting?

For example, a la Log::Contextual:

log_warn { 'The number of stuffs is: ' . $obj->stuffs_count };

See Log::ger::Format::Block for an example.

How to add timestamps?

TODO

TARGETS

How to customize format, output, filter on a per-target basis?

TODO

SEE ALSO

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.