Questions about this topic? Sign up to ask in the talk tab.
Difference between revisions of "Perl/Helpful Libraries/Throughput/Usage/Log"
From NetSec
AlizaLorenzo (Talk | contribs) (Created page with "* '''A simple logger''' {{code|text=<source lang="perl">my $logger = new Log(); $logger->error("an error has occured");</source>}} * Output defaults to STDERR but can be set to f...") |
Chantal21I (Talk | contribs) |
(No difference)
|
Latest revision as of 01:47, 19 July 2012
- A simple logger
my $logger = new Log(); $logger->error("an error has occured"); |
- Output defaults to STDERR but can be set to files in the constructor or using accessors.
$logger->error_log($filehandle); |
- Log also supports info, warn and digest:
$logger->info("info message"); $logger->warn("warning!"); $logger->info_log($filehandle); $logger->warn_log($filehandle); |
$logger->digest_log($filehandle); |