Tie::Log4perl
Tie a filehandle so that whatever is printed to it is instead logged via Log4perl, as recommended by Log::Log4Perl::FAQ, except that using the filehandle you tie as an appender will not cause infinite recursion.
tie *STDERR, 'Tie::Log4perl'; # This will be logged, instead warn "Parbleu, an error!\n";
The following options may be passed to tie after the class name either as a list or as a hash reference.
The level to log at. Defaults to $Log::Log4perl::Level::Debug.
The logger category object log with. Optional.
An optional string to prefix to messages.
Paul Driver <frodwith@cpan.org>
Copyright (C) 2009 Paul Driver
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Tie::Log4perl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tie::Log4perl
CPAN shell
perl -MCPAN -e shell install Tie::Log4perl
For more information on module installation, please visit the detailed CPAN module installation guide.