perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: modperl-2.0/xs/Apache/Log Apache__Log.h
Date Fri, 04 May 2001 06:31:38 GMT
dougm       01/05/03 23:31:38

  Modified:    t/conf   modperl_extra.pl
               xs/Apache/Log Apache__Log.h
  Log:
  Apache::Log methods default to global server object if needed
  
  Revision  Changes    Path
  1.7       +7 -0      modperl-2.0/t/conf/modperl_extra.pl
  
  Index: modperl_extra.pl
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/conf/modperl_extra.pl,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- modperl_extra.pl	2001/04/30 04:39:24	1.6
  +++ modperl_extra.pl	2001/05/04 06:31:34	1.7
  @@ -4,6 +4,7 @@
   
   use Apache::Server ();
   use Apache::Connection ();
  +use Apache::Log ();
   
   use Apache::Const -compile => ':common';
   use APR::Const -compile => ':common';
  @@ -11,6 +12,12 @@
   eval { require TestFilter::input_msg };
   
   use APR::Table ();
  +
  +my $ap_mods = scalar grep { /^Apache/ } keys %INC;
  +my $apr_mods = scalar grep { /^APR/ } keys %INC;
  +
  +Apache::Log->info("$ap_mods Apache:: modules loaded");
  +Apache::Server->log->info("$apr_mods APR:: modules loaded");
   
   sub ModPerl::Test::read_post {
       my $r = shift;
  
  
  
  1.8       +5 -9      modperl-2.0/xs/Apache/Log/Apache__Log.h
  
  Index: Apache__Log.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/Apache/Log/Apache__Log.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Apache__Log.h	2001/05/04 05:53:49	1.7
  +++ Apache__Log.h	2001/05/04 06:31:37	1.8
  @@ -29,7 +29,7 @@
           s = (server_rec *)SvObjIV(sv);
       }
       else {
  -        croak_inval_obj();
  +        s = modperl_global_get_server_rec();
       }
   
       if ((lmask == APLOG_DEBUG) && (s->loglevel >= APLOG_DEBUG)) {
  @@ -77,10 +77,6 @@
       void *retval;
       char *pclass;
   
  -    if (!SvROK(sv)) {
  -        Perl_croak(aTHX_ "Argument is not a reference");
  -    }
  -
       switch (logtype) {
         case MP_LOG_REQUEST:
           pclass = "Apache::Log::Request";
  @@ -88,7 +84,7 @@
           break;
         case MP_LOG_SERVER:
           pclass = "Apache::Log::Server";
  -        retval = (void *)SvObjIV(sv);
  +        retval = (void *)modperl_sv2server_rec(aTHX_ sv);
           break;
         default:
           croak_inval_obj();
  @@ -205,7 +201,7 @@
           r = modperl_xs_sv2request_rec(aTHX_ ST(0), NULL, cv);
           break;
         case 's':
  -        s = (server_rec *)SvObjIV(ST(0));
  +        s = modperl_sv2server_rec(aTHX_ ST(0));
           break;
         default:
           croak_inval_obj();
  @@ -292,10 +288,10 @@
       }
   
       switch (*GvNAME(CvGV(cv))) {
  -        case 'w':
  +      case 'w':
           modperl_log_warn(s, errstr);
           break;
  -        default:
  +      default:
           modperl_log_error(s, errstr);
           break;
       }
  
  
  

Mime
View raw message