| Basset documentation | view source | Contained in the Basset distribution. |
Basset::Logger - Logger object. Writes things to files.
Jim Thomason, jim@jimandkoka.com
my $logger = Basset::Logger->new( 'handle' => '/tmp/weasels.log' );
$logger->log("Weasels in the hen house!");
$logger->close();
Create a logger object, then log data to it, then close it when you're done. Easy as pie. Works beautifully in conjunction with Basset::NotificationCenter.
You will need to put a types entry into your conf file for
logger=Basset::Logger
(or whatever center you're using)
The place you log to. Either a string (which will be opened in append mode) or a globref.
$logger->handle('/path/to/log.log');
open (LOG, ">>/path/to/log.log");
$logger->handle(\*LOG);
logs the item to the logger's handle.
$logger->log("one val", "two vals", "three vals");
prints out one per line, tab indented on subsequent lines.
one val two vals three vals
| Basset documentation | view source | Contained in the Basset distribution. |