App-KGB
view release on metacpan or search on metacpan
script/kgb-bot view on Meta::CPAN
shift;
print $KGB::out localtime->strftime('%Y.%m.%d %H:%M:%S').': ', @_, ( $_[-1] =~ /\n$/s ) ? () : "\n";
}
sub debug {
return unless $KGB::debug;
my $self = shift;
my $first_line = shift;
$first_line = (caller)[2] . ': ' . $first_line;
$self->out( $first_line, @_ );
}
sub open_log {
if ( my $f = $KGB::config->{log_file} ) {
open( STDOUT, ">>", $f )
or die "Error opening log $f: $!\n";
open( STDERR, ">>", $f )
or die "Error opening log $f: $!\n";
( run in 1.628 second using v1.01-cache-2.11-cpan-1e74a51a04c )