NAME
Logger::Simple - Implementation of the Simran-Log-Log and Simran-Error-Error modules
SYNOPSIS
use Logger::Simple;
my $log=Logger::Simple->new({LOG=>"/tmp/program.log",CARP=>'1'});
my $x=5;my $y=4;
if($x>$y){
# Set an error message
$log->set("\$x is greater than \$y");
# Write a message to the log file
$log->write("\$x is greater than \$y");
}
$log->set("Another error message");
# Get entire Error Message History
my @msgs = $log->message;
foreach my $m(@msgs){
print "Message: $m\n";
}
# Get the last set error message
my $message=$log->message;
print "Message: $message\n";
DESCRIPTION
EXPORT
None by default.
ACKNOWLEDGEMENTS
This module is based on the Simran::Log::Log and Simran::Error::Error modules. I liked the principle behind them, but felt that the interface could be a bit better.
My thanks also goes out once again to Damian Conway for Object Oriented Perl, and also to Sam Tregar, for his book "Writing Perl Modules for CPAN". Both were invaluable references for me.
AUTHOR
Thomas Stanley <Thomas_J_Stanley@msn.com>
COPYRIGHT
Copyright (C) 2002 Thomas Stanley. All rights reserved. This program is free software; you can distribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
perl(1).