diff options
Diffstat (limited to 'Echolot/Log.pm')
-rw-r--r-- | Echolot/Log.pm | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Echolot/Log.pm b/Echolot/Log.pm index 9eb7d9f..a91ac08 100644 --- a/Echolot/Log.pm +++ b/Echolot/Log.pm @@ -1,7 +1,7 @@ package Echolot::Log; # (c) 2002 Peter Palfrader <peter@palfrader.org> -# $Id: Log.pm,v 1.1 2003/01/14 05:26:14 weasel Exp $ +# $Id: Log.pm,v 1.2 2003/01/14 06:27:41 weasel Exp $ # =pod @@ -37,10 +37,8 @@ sub header_log(%) { return $logstring; }; -sub init(%) { - my (%args) = @_; - - $LOG = Log::Dispatch->new( callbacks => \&header_log ); +sub reopen() { + $LOG->remove( 'file1' ); $LOG->add( Log::Dispatch::File->new( name => 'file1', min_level => 'debug', @@ -49,9 +47,12 @@ sub init(%) { )); }; -#sub log() { -# return $LOG; -#}; +sub init(%) { + my (%args) = @_; + + $LOG = Log::Dispatch->new( callbacks => \&header_log ); + reopen(); +}; sub debug($) { $LOG->debug(@_); |