[fpc-pascal]redirecting error messages
Peter Vreman
peter at freepascal.org
Wed Nov 22 17:27:02 CET 2000
> Hello,
>
> is there a secure way to redirect/copy all error messages like "Access
> violation" (including all other error information) to a file?
>
> The program is a cgi script (Linux), so I can't redirect the output
> using shell commands like "program 2>>errors.log" would do.
Creating a wrapper script that calls the real cgi is ofcourse possible.
But a more pascal solution that you can try is to close the stderr filehandle (2) and open
it again but with a filename as output.
More information about the fpc-pascal
mailing list