NAME
Bio::GMOD::Util::Status - Message processing for Bio::GMOD
SYNPOSIS
None. See below.
DESCRIPTION
Bio::GMOD::Util::Status provides a variety of methods for processing messages and handling errors throughout Bio::GMOD.
PUBLIC METHODS
- $self->logit(@options)
-
Log a message to STDERR. The message will be prefaced with the date and time.
Options: -msg The message to log -die Die after logging the message
- $self->warning(@options)
-
Log a message to STDERR but with a small flag to set it off from other messages.
Options: -msg The message to log
- $self->test_for_error($result,$msg);
-
Test a return value for success, logging (and dying) a failure or passing a warning if successful.
- $self->fetch_date()
-
Return a formatted date string.
- $self->status_string(@options);
-
Return a formatted string showing date, condition tested and result. This function is used predominantly for monitoring the status of an installation, generating a clean string for sending in emails, logging, etc.
eg: [22 Feb 2005 08:22:22] Restarting mysqld ............. [OK] Options: -timing usually one of initial (status before test) or final (status after test) -msg The actual test message -status The status of the result (ie OK, Failed)
- $self->set_status_flags($timing,$status);
-
Set various internal status flags of Bio::GMOD::Monitor::* objects. These include "is_up", "is_down", "initial_status", "final_status" as described for status_string above. See Bio::GMOD::Monitor for additional details in who these flags are used to indicate the status of particular servers or services.
BUGS
None reported.
SEE ALSO
AUTHOR
Todd W. Harris <harris@cshl.edu>.
Copyright (c) 2003-2005 Cold Spring Harbor Laboratory.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.