diff options
author | Peter Palfrader <peter@palfrader.org> | 2003-01-14 06:27:41 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2003-01-14 06:27:41 +0000 |
commit | 7a3bf2431b20ce0bfa7ec1cbc782975e687ef4d7 (patch) | |
tree | 5643d0bea4d9146942050adc334eed35f98b0933 /Echolot | |
parent | 1b5fed479a31e06829a714f7ac520b0f101642ff (diff) |
Documenting new requirements
Reopen log on SIGHUP
Diffstat (limited to 'Echolot')
-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(@_); |