The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

GO::DebugUtils

DESCRIPTION

Miscellaneous debugging utilities

FUNCTIONS

setsqllog

 usage:

  use GO::DebugUtils qw(:sql);
  open(MYLOGFILE, ">x.log");
  $ENV{SQL_TRACE} = 1;
  setdblog(\*MYLOGFILE);
  # ... main code here
  close(MYLOGFILE);

  defaults to STDERR

setdblog

 usage:

  use GO::DebugUtils qw(:db);
  open(MYLOGFILE, ">x.log");
  $ENV{DBLOGGING} = 1;
  setdblog(\*MYLOGFILE);
  # ... main code here
  close(MYLOGFILE);

  defaults to STDERR

setlog

 usage:

  use GO::DebugUtils qw(:general);
  open(MYLOGFILE, ">x.log");
  $ENV{MSGLOGGING} = 1;
  setdblog(\*MYLOGFILE);
  # ... main code here
  close(MYLOGFILE);

  defaults to STDERR

msglog

outputs a log message. if the environment variable MSGLOGGING is not set, this function will do nothing.

use the function setlog to set a logging file; otherwise output will default to STDERR

this is for general logging messages

usage:

  msglog("logging message");

dblog

outputs a db log message. if the environment variable DBLOGGING is not set, this function will do nothing.

use the function setdblog to set a logging file; otherwise output will default to STDERR

for consistency, this should be used to a produce a high level description of operations performed to modify the database

usage:

  dblog("add the clone and associated data");

sqllog

outputs an sql log message. if the environment variable SQL_TRACE is not set, this function will do nothing.

use the function setsqllog to set a logging file; otherwise output will default to STDERR

this should be used to produce an output of SQL commands executed

usage:

  sqllog("$sql_command");