in reply to not creating log files
Try something like this:
sub slog { my ( $prg, $priority, $msg ) = @_; return unless ($priority =~ /info|err|debug/); openlog( $prg, 'pid', 'user' ); syslog( $priority, $msg ); closelog(); return 1; }
Use it like this:
my $prg = $0; my $message =qq(Something weird happend!); slog( $prg, 'err', $message )
I assume you use Linux. So the message should be in /var/log/messages
On windows run eventvwr
.Hope that helps. Regards, Karl
«The Crux of the Biscuit is the Apostrophe»
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: not creating log files
by sumandas (Initiate) on Feb 03, 2014 at 14:49 UTC | |
by karlgoethebier (Abbot) on Feb 03, 2014 at 15:13 UTC | |
by marto (Cardinal) on Feb 03, 2014 at 14:50 UTC |