sub StartLogging { my $ref = shift @_; # ref to config hash my ( $file, $level ); $file = $ref->{log}{file_base} . ".$ref->{hostname}{target}.$0.$$.l +og"; $level = $ref->{log}{level}; if ( $ref->{log}{method} eq "StdLog" ) { print "Logging to file $file at minimum loglevel $level\n"; require Log::StdLog; Log::StdLog->import( { level => $level, file => $file, } ); #now, log messages can be written to {*STDLOG} print {*STDLOG} warn => "warn - this is a test"; } }
In reply to Re^3: Passing filename to Log::Std
by borisz
in thread Passing filename to Log::Std
by bowei_99
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |