You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Geoffrey Young <gy...@laserlink.net> on 2001/01/15 17:40:20 UTC
patch for setting loglevel
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
Re: patch for setting loglevel
Posted by Doug MacEachern <do...@covalent.net>.
On Mon, 15 Jan 2001, Geoffrey Young wrote:
> hi all...
>
> it may be a bit taboo, but here's a patch that allows you to set
> $r->server->loglevel...
i dig it, applied, thanks!