NAME

Whatbot::Log - Provides logging from within whatbot

SYNOPSIS

extends 'Whatbot::Component';

$self->log->write('This is a message.');
$self->log->error('This is an error!');

DESCRIPTION

Whatbot::Log provides basic log functionality from within whatbot. whatbot loads this class during startup, and is available under the 'log' accessor in any module subclassed from Whatbot::Component and loaded properly, including Commands.

ATTRIBUTES

last_error(bool)

Stores the last error written.

log_enabled(bool)

Defaults to 1/true. If set to false, log entries will not be written.

METHODS

error( $line )

Writes message to standard out / log file and 'warn's to STDERR.

write( $line )

Writes message to standard out / log file.

LICENSE/COPYRIGHT

Be excellent to each other and party on, dudes.