|
ensembl-hive
2.7.0
|
Public Member Functions | |
| public Bio::EnsEMBL::Utils::ConversionSupport | new () |
| public Boolean | log_generic () |
| public void | error () |
| public Boolean | warning () |
| public | info () |
| public Boolean | debug () |
| public | log_progress () |
| public | log_progressbar () |
| public | init_progress () |
| public Filehandle | log_filehandle () |
| public | extract_log_identifier () |
| public Filehandle | init_log () |
| public Boolean | finish_log () |
| public | runtime () |
| public String | date_and_mem () |
| public | time_and_mem () |
| public String | date () |
| public String | mem () |
| public Int | warning_count () |
| public | logfile () |
| public | log_auto_id () |
| public | logauto () |
| public | create_auto_logfile () |
| public | logpath () |
| public | logappend () |
| public | is_component () |
| public | loglevel () |
| public | log_error () |
| public | log_warning () |
| public | log () |
| public | log_verbose () |
| public | log_stamped () |
This module is a collection of common methods and provides helper functions for the Vega release and schema conversion scripts. Amongst others, it reads options from a config file, parses commandline options and does logging.
| public Bio::EnsEMBL::Utils::Logger::create_auto_logfile | ( | ) |
Arg[1] : Example :
Description :
Return type :
Exceptions :
Caller :
Status : At Risk
: under development
Code:
| public String Bio::EnsEMBL::Utils::Logger::date | ( | ) |
Example :
Description : Prints a nicely formatted timestamp (YYYY-DD-MM hh:mm:ss) Return type : String - the timestamp Exceptions : none Caller : general
Code:
| public String Bio::EnsEMBL::Utils::Logger::date_and_mem | ( | ) |
Example :
Description : Prints a timestamp and the memory usage of your script. Return type : String - timestamp and memory usage Exceptions : none Caller : general
Code:
| public Boolean Bio::EnsEMBL::Utils::Logger::debug | ( | ) |
Arg[1] : String $txt - the warning text to log Arg[2] : Int $indent - indentation level for log message Example :
Description : Logs a message via $self->log if --verbose option was used Return type : TRUE on success, FALSE if not verbose Exceptions : none Caller : general
Code:
| public void Bio::EnsEMBL::Utils::Logger::error | ( | ) |
Arg[1] : String $txt - the error text to log Arg[2] : Int $indent - indentation level for log message Example :
Description : Logs a message via $self->log and exits the script. Return type : none Exceptions : none Caller : general
Code:
| public Bio::EnsEMBL::Utils::Logger::extract_log_identifier | ( | ) |
Arg[1] : Example :
Description : Return type : Exceptions : Caller : Status :
Code:
| public Boolean Bio::EnsEMBL::Utils::Logger::finish_log | ( | ) |
Example :
Description : Writes footer information to a logfile. This includes the
number of logged warnings, timestamp and memory footprint.
Return type : TRUE on success
Exceptions : none
Caller : general
Code:
| public Bio::EnsEMBL::Utils::Logger::info | ( | ) |
Undocumented method
Code:
| public Filehandle Bio::EnsEMBL::Utils::Logger::init_log | ( | ) |
Example :
Description : Opens a filehandle to the logfile and prints some header
information to this file. This includes script name, date, user
running the script and parameters the script will be running
with.
Return type : Filehandle - the log filehandle
Exceptions : none
Caller : general
Code:
| public Bio::EnsEMBL::Utils::Logger::init_progress | ( | ) |
Undocumented method
Code:
| public Bio::EnsEMBL::Utils::Logger::is_component | ( | ) |
Arg[1] : Example :
Description : Return type : Exceptions : Caller : Status :
Code:
| public Bio::EnsEMBL::Utils::Logger::log | ( | ) |
Undocumented method
Code:
| public Bio::EnsEMBL::Utils::Logger::log_auto_id | ( | ) |
Arg[1] : Example :
Description : Return type : Exceptions : Caller : Status :
Code:
| public Bio::EnsEMBL::Utils::Logger::log_error | ( | ) |
Undocumented method
Code:
| public Filehandle Bio::EnsEMBL::Utils::Logger::log_filehandle | ( | ) |
Arg[1] : (optional) String $mode - file access mode Example :
Description : Returns a filehandle for logging (STDERR by default, logfile if
set from config or commandline). You can use the filehandle
directly to print to, or use the smart wrapper $self->log().
Logging mode (truncate or append) can be set by passing the
mode as an argument to log_filehandle(), or with the
--logappend commandline option (default: truncate)
Return type : Filehandle - the filehandle to log to
Exceptions : thrown if logfile can't be opened
Caller : general
Code:
| public Boolean Bio::EnsEMBL::Utils::Logger::log_generic | ( | ) |
Arg[1] : String $txt - the text to log Arg[2] : Int $indent - indentation level for log message Example :
Description : Logs a message to the filehandle initialised by calling
$self->log_filehandle(). You can supply an indentation level
to get nice hierarchical log messages.
Return type : true on success
Exceptions : thrown when no filehandle can be obtained
Caller : general
Code:
| public Bio::EnsEMBL::Utils::Logger::log_progress | ( | ) |
Undocumented method
Code:
| public Bio::EnsEMBL::Utils::Logger::log_progressbar | ( | ) |
Undocumented method
Code:
| public Bio::EnsEMBL::Utils::Logger::log_stamped | ( | ) |
Undocumented method
Code:
| public Bio::EnsEMBL::Utils::Logger::log_verbose | ( | ) |
Undocumented method
Code:
| public Bio::EnsEMBL::Utils::Logger::log_warning | ( | ) |
Undocumented method
Code:
| public Bio::EnsEMBL::Utils::Logger::logappend | ( | ) |
Arg[1] : Example :
Description : Return type : Exceptions : Caller : Status :
Code:
| public Bio::EnsEMBL::Utils::Logger::logauto | ( | ) |
Undocumented method
Code:
| public Bio::EnsEMBL::Utils::Logger::logfile | ( | ) |
Arg[1] : Example :
Description : Getter and setter for the logfile Return type : Exceptions : Caller : Status :
Code:
| public Bio::EnsEMBL::Utils::Logger::loglevel | ( | ) |
Undocumented method
Code:
| public Bio::EnsEMBL::Utils::Logger::logpath | ( | ) |
Arg[1] : Example :
Description : Return type : Exceptions : Caller : Status :
Code:
| public String Bio::EnsEMBL::Utils::Logger::mem | ( | ) |
Example :
Description : Prints the memory used by your script. Not sure about platform
dependence of this call ...
Return type : String - memory usage
Exceptions : none
Caller : general
Code:
| public Bio::EnsEMBL::Utils::ConversionSupport Bio::EnsEMBL::Utils::Logger::new | ( | ) |
Arg[1] : String $serverroot - root directory of your ensembl sandbox Example :
Description : constructor Return type : Bio::EnsEMBL::Utils::ConversionSupport object Exceptions : thrown on invalid loglevel Caller : general
Code:
| public Bio::EnsEMBL::Utils::Logger::runtime | ( | ) |
Undocumented method
Code:
| public Bio::EnsEMBL::Utils::Logger::time_and_mem | ( | ) |
Undocumented method
Code:
| public Boolean Bio::EnsEMBL::Utils::Logger::warning | ( | ) |
Arg[1] : String $txt - the warning text to log Arg[2] : Int $indent - indentation level for log message Example :
Description : Logs a message via $self->log and increases the warning counter. Return type : true on success Exceptions : none Caller : general
Code:
| public Int Bio::EnsEMBL::Utils::Logger::warning_count | ( | ) |
Example :
Description : Returns the number of warnings encountered while running the
script (the warning counter is increased by $self->log_warning).
Return type : Int - number of warnings
Exceptions : none
Caller : general
Code: