in reply to Re: Daemon, log4perl & stderr/stdout
in thread Daemon, log4perl & stderr/stdout
open STDERR, '>', "$run_path/stderr.txt" or die "Can't redirect STDERR: $!";And the STDERR output from each command subsequently run using backticks `/some/command` gets written to the stderr.txt log file. But if I run in Daemon mode (uncomment the Proc::Daemon::Init() call), the STDERR & STDOUT info is getting lost. Even though I'm opening them as above. I wonder if I need to close them first. (update closing them first makes no difference, it's as if once Proc::Daemon gets ahold of them I can't redirect them elsewhere)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Daemon, log4perl & stderr/stdout
by ikegami (Patriarch) on May 27, 2008 at 22:46 UTC | |
by pc88mxer (Vicar) on May 27, 2008 at 23:17 UTC | |
|
Re^3: Daemon, log4perl & stderr/stdout
by ikegami (Patriarch) on May 27, 2008 at 22:59 UTC | |
by saberworks (Curate) on May 28, 2008 at 17:59 UTC | |
|
Re^3: Daemon, log4perl & stderr/stdout
by pc88mxer (Vicar) on May 27, 2008 at 22:37 UTC | |
by saberworks (Curate) on May 28, 2008 at 18:00 UTC |