This software offers a streamlined method for tracing tasks with a consolidated approach.
All exports are capitalized to minimize the probability of conflicts with "real" functions. The SYNOPSIS section gives an idea of what Log::Trace can accomplish. The tracing targets are determined by the user:
- use Log::Trace; # No output
- use Log::Trace 'print'; # print to STDOUT
- use Log::Trace log => '/var/log/foo.log'; # Output to log file
- use Log::Trace print => { Level => 3 };
Switching logging on or off with a constant is easy:
- use Log::Trace;
- import Log::Trace ('log' => LOGFILE) if TRACING;
To set up tracing for all packages that advertise TRACE:
- use Foo;
- use Bar;
- use Log::Trace warn => { Deep => 1 };
To exclude all subpackages of Foo, try:
- use Log::Trace warn => {Deep => 1, 'Exclude' => 'Foo'};
The software offers exported functions for tracing, such as TRACE("Record this..."), TRACEF("A la printf: %d-%.2f", 1, 2.9999), TRACE_HERE(), and DUMP. The DUMP function returns a dump without tracing when given arguments.
Version 1.070: N/A