IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 11, 2006, 2:02:53 PM (20 years ago)
Author:
jhoblitt
Message:

make Nebulous::Server::Log mod_perl aware
change Nebulous::Server::Log to accept a Nebulous::Server::Config object as a parameter instead of fetching it as a singleton

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/lib/Nebulous/Server/Log.pm

    r4880 r10627  
    11# Copyright (c) 2004  Joshua Hoblitt
    22#
    3 # $Id: Log.pm,v 1.5 2005-08-26 02:06:33 jhoblitt Exp $
     3# $Id: Log.pm,v 1.6 2006-12-12 00:02:53 jhoblitt Exp $
    44
    55package Nebulous::Server::Log;
     
    88use warnings FATAL => qw( all );
    99
    10 our $VERSION = '0.01';
     10our $VERSION = '0.02';
    1111
    1212use Log::Log4perl;
     
    1414
    1515sub init {
    16     # test for an extern config file here
    17     my $config = Nebulous::Server::Config->instance;
     16    my ($self, $config) = @_;
    1817
    1918    my $dsn         = $config->dsn;
     
    5049END
    5150
    52     Log::Log4perl::init( \$conf );
     51    if ($INC{'Apache/DBI.pm'} && $ENV{MOD_PERL}) {
     52        Log::Log4perl::init_once( \$conf );
     53    } else {
     54        Log::Log4perl::init( \$conf );
     55    }
     56
     57    return 1;
    5358}
    5459
Note: See TracChangeset for help on using the changeset viewer.