retrieving LogLevel?

2000-03-28 Thread Geoffrey Young

hi all...

I've hunted around and can't find a method that retrieves the
LogLevel directive setting.  Is there one?  If not, is there a record
somewhere that can make this available, maybe through Apache::Server?

thanks

--Geoff



Re: retrieving LogLevel?

2000-03-28 Thread James G Smith

Geoffrey Young [EMAIL PROTECTED] wrote:
hi all...

   I've hunted around and can't find a method that retrieves the
LogLevel directive setting.  Is there one?  If not, is there a record
somewhere that can make this available, maybe through Apache::Server?

Looks like it is in the C API - but don't see a documented reference
to it in the Perl API.

The following might get you started (in src/modules/perl/Server.xs):

 int
 loglevel(server)
 Apache::Server  server
 
 CODE:
 RETVAL = server-loglevel;
 
 OUTPUT:
 RETVAL

I couldn't find any mention of loglevel in the .xs files in such a way
that Perl code would have access to it.  I've also never coded with XS,
so the above is based on the pattern established in Server.xs.
+-
James Smith - [EMAIL PROTECTED] | http://www.jamesmith.com/
[EMAIL PROTECTED] | http://sourcegarden.org/
  [EMAIL PROTECTED]  | http://cis.tamu.edu/systems/opensystems/
+--



RE: retrieving LogLevel?

2000-03-28 Thread Eric Cholet

 hi all...
 
   I've hunted around and can't find a method that retrieves the
 LogLevel directive setting.  Is there one?  If not, is there a record
 somewhere that can make this available, maybe through Apache::Server?

It's not there currently but could easily be. Try this patch:

Index: Server.xs
===
RCS file: /home/cvs/modperl/src/modules/perl/Server.xs,v
retrieving revision 1.6
diff -b -u -r1.6 Server.xs
--- Server.xs   1999/08/20 08:34:43 1.6
+++ Server.xs   2000/03/28 13:33:34
@@ -113,6 +113,18 @@
   
 #  char *error_fname;
 #  FILE *error_log;
+#  int loglevel;
+
+int
+loglevel(server)
+Apache::Server server
+
+CODE:
+RETVAL = server-loglevel;
+
+OUTPUT:
+RETVAL
+
 
 #  /* Module-specific configuration for server, and defaults... */


To be complete I'd also patch Constants.xs to import the relevant
LOGLEVEL_XXX constants.

Let me know if this works,

--
Eric