cholet 00/03/31 09:07:24 Modified: . Changes Apache Apache.pm src/modules/perl Log.xs Log: add $r->server->loglevel() Revision Changes Path 1.449 +3 -0 modperl/Changes Index: Changes =================================================================== RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.448 retrieving revision 1.449 diff -u -r1.448 -r1.449 --- Changes 2000/03/31 05:16:04 1.448 +++ Changes 2000/03/31 17:07:23 1.449 @@ -10,6 +10,9 @@ =item 1.22_01-dev +add $r->server->loglevel() and relevant constants +[Eric Cholet <[EMAIL PROTECTED]>] + $Apache::Server::AddPerlVersion uses $^V for Perl/v5.6.0+ update mod_ssl config for 'make test' 1.44 +20 -0 modperl/Apache/Apache.pm Index: Apache.pm =================================================================== RCS file: /home/cvs/modperl/Apache/Apache.pm,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- Apache.pm 2000/03/07 02:52:06 1.43 +++ Apache.pm 2000/03/31 17:07:23 1.44 @@ -688,6 +688,26 @@ Returns the numeric group id under which the server answers requests. This is the value of the Group directive. +=item $s->loglevel + +Returns the value of the current LogLevel. This method is added by +the Apache::Log module, which needs to be pulled in. + + use Apache::Log; + print "LogLevel = ", $s->loglevel; + +If using Perl 5.005+, the following constants are defined (but not +exported): + + Apache::Log::EMERG + Apache::Log::ALERT + Apache::Log::CRIT + Apache::Log::ERR + Apache::Log::WARNING + Apache::Log::NOTICE + Apache::Log::INFO + Apache::Log::DEBUG + =item $r->get_handlers( $hook ) Returns a reference to a list of handlers enabled for $hook. $hook is 1.11 +23 -0 modperl/src/modules/perl/Log.xs Index: Log.xs =================================================================== RCS file: /home/cvs/modperl/src/modules/perl/Log.xs,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- Log.xs 1999/06/04 17:50:46 1.10 +++ Log.xs 2000/03/31 17:07:24 1.11 @@ -190,8 +190,31 @@ Apache_log_debug(s, ...) SV *s +MODULE = Apache::Log PACKAGE = Apache::Server +PROTOTYPES: DISABLE +BOOT: +#ifdef newCONSTSUB + { + HV *stash = gv_stashpv("Apache::Log", TRUE); + newCONSTSUB(stash, "EMERG", newSViv(APLOG_EMERG)); + newCONSTSUB(stash, "ALERT", newSViv(APLOG_ALERT)); + newCONSTSUB(stash, "CRIT", newSViv(APLOG_CRIT)); + newCONSTSUB(stash, "ERR", newSViv(APLOG_ERR)); + newCONSTSUB(stash, "WARNING", newSViv(APLOG_WARNING)); + newCONSTSUB(stash, "NOTICE", newSViv(APLOG_NOTICE)); + newCONSTSUB(stash, "INFO", newSViv(APLOG_INFO)); + newCONSTSUB(stash, "DEBUG", newSViv(APLOG_DEBUG)); + } +#endif +int +loglevel(server) + Apache::Server server + CODE: + RETVAL = server->loglevel; + OUTPUT: + RETVAL