NAME
Maplat::Helpers::TextLogger - log to STDOUT and a logfile
SYNOPSIS
use Maplat::Helpers::TextLogger qw(tabsToTable normalizeString);
my $logger = new Maplat::Helpers::TextLogger(
appname => "myApp",
logfile => "yada.log"
);
$logger->log("Something happend");
$logger->alive; # Notify the user that we're still alive
DESCRIPTION
This is a helper module to log to STDOUT as well as to a text file with the current date and time prefixed to the logline.
new()
my $logger = new Maplat::Helpers::TextLogger(
appname => "myApp",
logfile => "yada.log"
);
appname is the application name or some other unique identifier. logfile is the filename of the logfile we want to use.
Takes one argument, the text we want to log.
alive()
Log a "application_name is alive" log line. Use this if your program prints our log lines very infrequently to show that the application is still running. Every 5 to 10 minutes or so is a good rule of thumb.
AUTHOR
Rene Schickbauer, <rene.schickbauer@magnapowertrain.com>
COPYRIGHT AND LICENSE
Copyright (C) 2009 Rene Schickbauer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 78:
Unknown directive: =head