in reply to How to create an error log file?
This is what I use:
This appends to the logfile all the output sent to STDERR, both during compile-time and during run-time. E.g., if I have the lineBEGIN { require 5.004; use CGI::Carp qw(fatalsToBrowser carpout); my $logfile = 'path/to/logfile'; open LOG, ">>$logfile" or die "Couldn't append to $logfile: $!\n"; carpout(\*LOG); };
in my code, this will send the following to the logfile:warn "Logging...\n";
[Thu Apr 7 05:39:57 2005] testcgi: Logging...
the lowliest monk
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to create an error log file?
by tsam (Novice) on Apr 07, 2005 at 10:18 UTC |