ArrayExpress::Curator::Logger
use base qw/ArrayExpress::Curator::Logger/;
This module is subclassed by ExperimentChecker and Tab2MAGE classes to provide them both with logging and error recording facilities.
The objects created by this module can be instantiated with the following options.
log_to_current_dir
A flag indicating whether to write log files to the current directory or not. Note that this has been overloaded such that any true value is now interpreted as the name of a directory into which to write.
clobber
A flag indicating whether to silently overwrite old logs or not.
progname
A program name string, used in log headers.
version
A version string, used in log headers.
add_error( $error )
Takes an integer, bitwise ORs it with the object's internally-stored error, records and returns the result. Used to store the overall error code determining suitability for MAGE-ML export. The final value is accessible using get_error().
logfiles( $type )
Given the desired log file type, returns the desired filename template. Otherwise, returns a list of log file types.
log_fh(
$type )
Given the desired log file type, returns the opened filehandle.
logprint( $type, $message
)
Given the desired log file type and a message, prints the message to that log file. Linebreaks are not added to the output.
logprint_line( $type, $message
)
Given the desired log file type and a message, prints the message as part of a section-delimiting line in the log file. In this case linebreaks are added to the output.
localize_logfiles( $args
)
Given an optional hashref argument (keys: ``volume'', ``directory'', ``name''), attempts to localize the logfiles to the directory structure given. Overridden by the log_to_current_dir attribute when setting log file location.
Tim Rayner (rayner@ebi.ac.uk), ArrayExpress team, EBI, 2008.
Acknowledgements go to the ArrayExpress curation team for feature requests, bug reports and other valuable comments.