$Id: README.debug,v 1.3 2003/05/22 19:53:35 jeff Exp $

extproc_perl Debugging
----------------------

If you enabled debugging during the configuration process, extproc_perl can
log its various internal activities to a log file.  In addition, STDERR output
from your Perl code can be redirected to that same log file.

To enable debugging, call the _enable_debug special subroutine from a select
statement.  It will return the path to the log file.  Currently, each session
has its own log file whose name is based on the PID of the external process.

SQL> select perl('_enable_debug') from dual;

PERL('_ENABLE_DEBUG')
-------------------------------------------------------------------------------
/tmp/ep_debug.19446

NOTE: The Oracle user or group must have write permission in the parent
directory of the log file!  This directory is currently hard-coded to /tmp.

You can then tail the speicified file to see logs as they are generated, or
wait until your session is completed and view the file as a whole.
Note that extproc_perl will NOT remove these files.  You will need to clean
them up manually when you no longer need them.

To disable debugging, call the _disable_debug special subroutine.

You can also utilize the debugging facilities from your Perl code by using
the ep_debug function from the ExtProc module, as follows:

use ExtProc;
ep_debug("testing");

The advantage to using this function over STDERR is that the message will be
timestamped and is guaranteed to appear in the correct order in relation to
other internally generated messages.
