GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  GUNGHO::LOG::DISPATCH (3)

.ds Aq ’

NAME

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

CONTENTS

SYNOPSIS



  # in your Gungho config
  log:
    module: Dispatch
    config:
      logs:
        - module: Screen
          min_level: debug
          name: stderr
          stderr: 1
        - module: File
          min_level: info
          filename: /path/tofilename
          mode: append

  # ... or somewhere in your code ..
  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.

To use, specify something like this in your config:



  log:
    module: Dispatch
    config:
      logs:
        - module: File
          min_level: info
          filename: /path/to/filename
          name: logfile



Each entry in the logs section specifies one Log::Dispatch type. The module parameter is taken as the Log::Dispatch subclass name, and it will be prefixed with the string Log::Dispatch::. All other parameters are passed directly to the constructor.

You may specify multiple logs to be added to the Log::Dispatch object. See the documentation for Log::Dispatch for details.

To log, access the log object from $c:



  $c->log->debug("This is a debug message");
  $c->log->emergency("This is an emergency message");



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
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 GUNGHO::LOG::DISPATCH (3) 2007-11-27

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.