DebugLogger - interface for logging debug information provided by Debug module
This module must not be used directly, use inheriting modules instead.
# example
use DebugLogger::Stdout;
my $logger = DebugLogger::Stdout->new;
$logger
->handle(STDERR) # heuristical default
->use_html(0) # heuristical default
->show_ident(1) # heuristical default
->show_time(1)
->show_times(1)
->times_format("%5.2f, %5.2f, %5.2f, %5.2f")
->monitor(":main")
->start
;
...
$logger->stop;
...
# another example
use DebugLogger::File;
DebugLogger::File->new->set_safe_append(1)->monitor(":all")->start;
This abstract module is used to actually log the provided debug information.
the Debug manpage, the DebugLogger::Stdout manpage, the DebugLogger::File manpage, the DebugLogger::PackageGroups manpage.
the Exception manpage, the Debug manpage, the DebugLogger::PackageGroups manpage, the Date::TimeFormat manpage.
Other parameters are protected.
$logger->set_monitoring($value, ':main', 'My::Package');
* boolean value: 1/0 - add/remove * package names or package group aliases
$logger->monitor(':main', 'My::Package');
$logger->unmonitor(':main', 'My::Package');
$logger->start(); ... $logger->stop();
$logger->start(); ... $logger->stop();
$logger->show_time(1)->use_html(0);
* use_html - default: 2 (smart) * show_header - default: 1 * show_ident - default: 2 (smart) * show_time - default: 0 * show_times - default: 0
show_prefix([$value])$logger->show_prefix(6)->start;
If no value is passed then the current artificial ``prefix'' value is evaluated and returned (i.e. undef for the default, or 0 to 7).
$logger->set_text_join_format("\n")->set_html_join_format("<BR>");
* text_header - default: "[Starting debugging log]\n" * html_header - default: both html-comment and cgi-header * ident_string - default: "Debug", * time_string - default: "%H:%M:%S", * times_string - default: "%6.2f,%6.2f", * text_prefix_format - default: "[%s] ", * html_prefix_format - default: "<I>[%s]</I> ", * text_line_format - default: "%s%s\n", * html_line_format - default: "\n<BR><B>%s%s</B><BR>\n" * text_join_format - default: "\n%s" * html_join_format - default: "\n <BR>%s",
If $Podius::PROJECTS_HOME and $Podius::PROJECT_NAME constants are defined, they are added in the header info.