NAME

Gungho::Log::Dispatch - Log::Dispatch-Based Log For Gungho

SYNOPSIS

  use Gungho::Log::Dispatch;

  my $log = Gungho::Log::Dispatch->new();
  $log->setup($c, {
    logs => [
      { module    => 'Screen',
        min_level => 'debug',
        name      => 'stderr',
        stderr    => 1
      },
      { module    => 'File',
        min_level => 'info',
        filename  => '/path/to/filename'
        mode      => 'append'
      }
    ]
  });

DESCRIPTION

This is the main log class for Gungho. It gives you the full power of Log::Dispatch for your needs.

CAVEATS

Do NOT use Log::Dispatch::File::Locked if you're running Gungho in a multi-process environment. It's obvious if you think about it, but this is a hard-to-debug problem because File::Locked will simply sit on its flock() wait while 1 Gungho process will merrily go processing requests.

METHODS

setup($c, \%config)

Sets up the module

debug

info

notice

warning

error

critical

alert

emergency

Logs to each level