perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r1410400 - in /perl/modperl/trunk: src/modules/perl/modperl_apache_compat.h xs/Apache2/Log/Apache2__Log.h
Date Fri, 16 Nov 2012 15:35:55 GMT
Author: jorton
Date: Fri Nov 16 15:35:54 2012
New Revision: 1410400

URL: http://svn.apache.org/viewvc?rev=1410400&view=rev
Log:
* xs/Apache2/Log/Apache2__Log.h,
  src/modules/perl/modperl_apache_compat.h: Adapt logging for 2.4 API.

Obtained from: branches/httpd24
Submitted by: torsten

Modified:
    perl/modperl/trunk/src/modules/perl/modperl_apache_compat.h
    perl/modperl/trunk/xs/Apache2/Log/Apache2__Log.h

Modified: perl/modperl/trunk/src/modules/perl/modperl_apache_compat.h
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_apache_compat.h?rev=1410400&r1=1410399&r2=1410400&view=diff
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_apache_compat.h (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_apache_compat.h Fri Nov 16 15:35:54 2012
@@ -77,6 +77,8 @@ AP_DECLARE(const char *) ap_get_server_v
 #define mp_add_loaded_module(modp, pool, name) \
   ap_add_loaded_module((modp), (pool), (name))
 
+#define mp_loglevel(s) ((s)->log.level)
+#define mp_module_index_ perl_module.module_index,
 
 #else
 /* 2.2 API */
@@ -88,6 +90,8 @@ AP_DECLARE(const char *) ap_get_server_v
 #define mp_add_loaded_module(modp, pool, name) \
   ap_add_loaded_module((modp), (pool))
 
+#define mp_loglevel(s) ((s)->loglevel)
+#define mp_module_index_
 
 #endif
 

Modified: perl/modperl/trunk/xs/Apache2/Log/Apache2__Log.h
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/xs/Apache2/Log/Apache2__Log.h?rev=1410400&r1=1410399&r2=1410400&view=diff
==============================================================================
--- perl/modperl/trunk/xs/Apache2/Log/Apache2__Log.h (original)
+++ perl/modperl/trunk/xs/Apache2/Log/Apache2__Log.h Fri Nov 16 15:35:54 2012
@@ -48,13 +48,13 @@ static void mpxs_ap_log_error(pTHX_ int 
         s = modperl_global_get_server_rec();
     }
 
-    if ((lmask == APLOG_DEBUG) && (s->loglevel >= APLOG_DEBUG)) {
+    if ((lmask >= APLOG_DEBUG) && (mp_loglevel(s) >= APLOG_DEBUG)) {
         COP *cop = PL_curcop;
         file = CopFILE(cop); /* (caller)[1] */
         line = CopLINE(cop); /* (caller)[2] */
     }
 
-    if ((s->loglevel >= lmask) &&
+    if ((mp_loglevel(s) >= lmask) &&
         SvROK(msg) && (SvTYPE(SvRV(msg)) == SVt_PVCV)) {
         dSP;
         ENTER;SAVETMPS;
@@ -72,10 +72,12 @@ static void mpxs_ap_log_error(pTHX_ int 
     }
 
     if (r) {
-        ap_log_rerror(file, line, level, 0, r, "%s", str);
+        ap_log_rerror(file, line, mp_module_index_ level, 0, r,
+		      "%s", str);
     }
     else {
-        ap_log_error(file, line, level, 0, s, "%s", str);
+        ap_log_error(file, line, mp_module_index_ level, 0, s,
+		     "%s", str);
     }
 
     if (svstr) {
@@ -258,10 +260,12 @@ MP_STATIC XS(MPXS_Apache2__Log_log_xerro
     msgstr = SvPV(msgsv, n_a);
 
     if (r) {
-        ap_log_rerror(file, line, level, status, r, "%s", msgstr);
+        ap_log_rerror(file, line, mp_module_index_ level, status, r,
+		      "%s", msgstr);
     }
     else {
-        ap_log_error(file, line, level, status, s, "%s", msgstr);
+        ap_log_error(file, line, mp_module_index_ level, status, s,
+		     "%s", msgstr);
     }
 
     SvREFCNT_dec(msgsv);



Mime
View raw message