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

NAME

DeltaX::Trace - Perl module for writing log messages

     _____
    /     \ _____    ______ ______ ___________
   /  \ /  \\__  \  /  ___//  ___// __ \_  __ \
  /    Y    \/ __ \_\___ \ \___ \\  ___/|  | \/
  \____|__  (____  /____  >____  >\___  >__|
          \/     \/     \/     \/     \/        project

SYNOPSIS

 use DeltaX::Trace;    # exports only trace() and trace_set()
 use DeltaX::Trace qw/error warn info debug/;

 trace_set(trace_file=>'my_log_file.log');

 trace('D', "This is", "message");
 warn("This is warning");

FUNCTIONS

trace_set()

Used to set tracing options (parameters are in key => value form):

trace_file

File to write trace messages (default is /var/tmp/trace.log).

trace_error_file

If set, error messages will be written to file (default is true).

trace_error_std

If set, error messages will be written to stderr (default is false).

trace_warn_file

If set, warning messages will be written to file (default is true).

trace_warn_std

If set, warning messages will be written to stderr (default is false).

trace_info_file

If set, info messages will be written to file (default is true).

trace_info_std

If set, info messages will be written to stderr (default is false).

trace_debug_file

If set, debug messages will be written to file (default is true).

trace_debug_std

If set, debug messages will be written to stderr (default is false).

trace_pid

Is set, process ID will be attached to every message.

trace_stack

Is set, stack will be printed: 1 with ERROR's 2 with E and W 3 with E, W and I 4 with E, W, I and D

0 stack won't be printed.

trace()

This function actually creates and writes a message. First argument is a type of a message (E, W, I, D), other parameters are joined together into one line (with spaces).

error()

Works as trace('E', ...).

warn()

Works as trace('W', ...).

info()

Works as trace('I', ...).

debug()

Works as trace('D', ...).

_tspecial()

Function for masser.fcgi - this value is printed instead of file name (if set).

get_stack()

Returns stack (as an array) - based on Carp::Heavy code.