NAME

Krang::Log - Krang logging module


SYNOPSIS

  use Krang::ClassLoader Log => qw(debug info critical ASSERT assert affirm should shouldnt);
  # logging messages
  debug("I'm inside of block X and \$a == $a.");
  critical("This is a critical application failure!!!!");
  info("Supply informative message here.");
  # assertion functions from Carp::Assert
  assert($positive >= 0) if ASSERT
  affirm { $positive >= 0 } if ASSERT;
  should($nine, 9) if ASSERT;
  shouldnt($nine, 10) if ASSERT;
  # reopen log file (usually after a fork)
  reopen_log();


DESCRIPTION

This module logs messages to file based on the configuration directives set in 'krang.conf'. The relevant configuration directives are:

On compilation, the log object is created and all the functions provided in the import list are exported into the caller's namespace. No functions are exported by default.

The following log levels are supported and available as exported functions:

Output from this module resembles the following:

   [timestamp] [level] message

Please note, a newline character will be appended to the message if one is not included.


INTERFACE


TO DO


SEE ALSO

Krang, Krang::Conf, Time::Piece