IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10627


Ignore:
Timestamp:
Dec 11, 2006, 2:02:53 PM (19 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

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/Changes

    r10580 r10627  
    1313    - change Nebulous::Server::SOAP install stub methods to bypass AUTOLOAD on
    1414      successive calls to the same method
     15    - make Nebulous::Server::Log mod_perl aware
     16    - change Nebulous::Server::Log to accept a Nebulous::Server::Config object
     17      as a parameter instead of fetching it as a singleton
    1518
    16190.02 Fri Dec  2 17:36:59 HST 2005
  • trunk/Nebulous-Server/lib/Nebulous/Server.pm

    r10575 r10627  
    11# Copyright (c) 2004  Joshua Hoblitt
    22#
    3 # $Id: Server.pm,v 1.21 2006-12-08 20:57:36 jhoblitt Exp $
     3# $Id: Server.pm,v 1.22 2006-12-12 00:02:53 jhoblitt Exp $
    44
    55package Nebulous::Server;
     
    2929
    3030    # log4perl is not avaliable until we call init()
    31     Nebulous::Server::Log->init;
    32 
     31    Nebulous::Server::Log->init($config);
    3332    my $log = Log::Log4perl::get_logger( "Nebulous::Server" );
     33
    3434    my $sql = Nebulous::Server::SQL->new;
    3535
  • 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
  • trunk/Nebulous/Changes

    r10580 r10627  
    1313    - change Nebulous::Server::SOAP install stub methods to bypass AUTOLOAD on
    1414      successive calls to the same method
     15    - make Nebulous::Server::Log mod_perl aware
     16    - change Nebulous::Server::Log to accept a Nebulous::Server::Config object
     17      as a parameter instead of fetching it as a singleton
    1518
    16190.02 Fri Dec  2 17:36:59 HST 2005
  • trunk/Nebulous/lib/Nebulous/Server.pm

    r10575 r10627  
    11# Copyright (c) 2004  Joshua Hoblitt
    22#
    3 # $Id: Server.pm,v 1.21 2006-12-08 20:57:36 jhoblitt Exp $
     3# $Id: Server.pm,v 1.22 2006-12-12 00:02:53 jhoblitt Exp $
    44
    55package Nebulous::Server;
     
    2929
    3030    # log4perl is not avaliable until we call init()
    31     Nebulous::Server::Log->init;
    32 
     31    Nebulous::Server::Log->init($config);
    3332    my $log = Log::Log4perl::get_logger( "Nebulous::Server" );
     33
    3434    my $sql = Nebulous::Server::SQL->new;
    3535
  • trunk/Nebulous/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.