Wombat::Logger::FileLogger - file logger class
my $logger = Wombat::Logger::FileLogger->new(); $logger->setFileName("/var/log/wombat/wombat.log"); $logger->log("this will show up in the log file");
Convenience base class for logger implementations. The only method that must be implemented is write(), plus any accessor methods required for configuration.
write()
Construct and return a Wombat::Logger::FileLogger instance, initializing fields appropriately. If subclasses override the constructor, they must be sure to call
$self->SUPER::new();
Return the name of the file that is the log destination.
Set the name of the file that is the log destination.
Parameters:
the name of the file
Write the specified string to the log destination. The default implementation does nothing. Subclasses must override this method.
the string to write to the log destination
Prepare for the beginning of active use of this Logger by opening the file.
Throws:
if the file cannot be opened
Gracefully terminate the active use of this Logger by closing the file.
if the file cannot be closed
Servlet::Util::Exception, Wombat::Logger::LoggerBase
Brian Moseley, bcm@maz.org
To install Wombat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Wombat
CPAN shell
perl -MCPAN -e shell install Wombat
For more information on module installation, please visit the detailed CPAN module installation guide.