toadi has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
--
My opinions may have changed,
but not the fact that I am right
I have a perl script as a service in windows:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\daemon\Parameter +s] "Application"="C:\\perl\\bin\\perl.exe" "AppParameters"="c:\\server\\server.pl"
I installed it wit srvany.
Now I have a debug switch I can turn on and then all the print statements get printed. Also there are some issues throwing perl warnings. I tried to redirect with >> and 2>>, but this doesn't work while running as a service.
I tried to create a bat file, but then I can't stop the service anymore.
So I need some guidance how to redirect the STDERR AND STDOUT to a file when running as a windows service.
--
My opinions may have changed,
but not the fact that I am right
Edit: g0n - removed pre tags, added formatting
2006-05-13 Retitled by Arunbear
Original title: 'Cathing errors and print statements'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: how to redirect STDERR and STDOUT to a file when running as a windows service?
by wazoox (Prior) on May 12, 2006 at 11:35 UTC | |
by toadi (Chaplain) on May 12, 2006 at 13:06 UTC | |
by Anonymous Monk on Nov 02, 2012 at 10:28 UTC | |
Re: how to redirect STDERR and STDOUT to a file when running as a windows service?
by Hue-Bond (Priest) on May 12, 2006 at 10:14 UTC |
Back to
Seekers of Perl Wisdom