CogUtil::Log
use CogUtil::Log; $log = CogUtil::Log->new(); $log->write(msg=>"This is the message that goes in the log file");
Module usefull for logging activities in other modules.
use CogUtil::Log; $log = CogUtil::Log->new(filename=>"/tmp/logfile.txt",label=>'TESTPortal'); $log->write(msg=>"This is the message that goes in the log file");
Cathie Mills cmills@sdsc.edu Maytal Dahan maytal@tacc.utexas.edu Stephen Mock mock@sdsc.edu
new (constructor) Parameters: filename - this is the location and filename of where the log file is located label - this is a label that goes before the string that is put in the log file, for example PORTALNAME or PORTALNAME,FUNCTION Usage $log = CogUtil::Log->new(filename=>"logfile",label=>"label"); Returns reference to self
Writes the message passed in to log file, it appends the log label and date.
Parameters: msg - message to write to log file Usage $log->write(msg=>"message to log file"); Returns 1 if successful else -1