perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <gyo...@laserlink.net>
Subject patch for setting loglevel
Date Mon, 15 Jan 2001 16:40:20 GMT
hi all...

it may be a bit taboo, but here's a patch that allows you to set
$r->server->loglevel...

I was interested in maybe doing something like this from a cleanup handler:

...
  return DECLINED unless $r->is_initial_req && $r->status == SERVER_ERROR;
  $r->server->loglevel(Apache::Log::DEBUG);

  DBI->trace(2);
  my $subreq = $r->lookup_uri($r->uri);
  $subreq->server->loglevel(Apache::Log::DEBUG);
  $subreq->run;
...

or whatever...

anyway, it was a simple thing to change - maybe there are other uses as
well?

--Geoff

Index: Log.xs
===================================================================
RCS file: /home/cvspublic/modperl/src/modules/perl/Log.xs,v
retrieving revision 1.11
diff -u -r1.11 Log.xs
--- Log.xs      2000/03/31 17:07:24     1.11
+++ Log.xs      2001/01/15 15:52:33
@@ -1,4 +1,5 @@
 #include "mod_perl.h"
+#include "mod_perl_xs.h"
 
 #if MODULE_MAGIC_NUMBER >= MMN_132
 #define HAVE_LOG_RERROR 1
@@ -210,11 +211,11 @@
 #endif
 
 int
-loglevel(server)
+loglevel(server, ...)
     Apache::Server     server
 
     CODE:
-    RETVAL = server->loglevel;
+    get_set_IV(server->loglevel); 
 
     OUTPUT:
     RETVAL

Mime
View raw message