httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r951894 - in /httpd/httpd/trunk/modules: examples/mod_example_hooks.c lua/lua_config.c lua/lua_request.c ssl/ssl_engine_log.c ssl/ssl_private.h ssl/ssl_util.c
Date Sun, 06 Jun 2010 16:56:08 GMT
Author: sf
Date: Sun Jun  6 16:56:08 2010
New Revision: 951894

URL: http://svn.apache.org/viewvc?rev=951894&view=rev
Log:
Fix some modules to make them compile with per-module loglevels.

Modified:
    httpd/httpd/trunk/modules/examples/mod_example_hooks.c
    httpd/httpd/trunk/modules/lua/lua_config.c
    httpd/httpd/trunk/modules/lua/lua_request.c
    httpd/httpd/trunk/modules/ssl/ssl_engine_log.c
    httpd/httpd/trunk/modules/ssl/ssl_private.h
    httpd/httpd/trunk/modules/ssl/ssl_util.c

Modified: httpd/httpd/trunk/modules/examples/mod_example_hooks.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/examples/mod_example_hooks.c?rev=951894&r1=951893&r2=951894&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/examples/mod_example_hooks.c (original)
+++ httpd/httpd/trunk/modules/examples/mod_example_hooks.c Sun Jun  6 16:56:08 2010
@@ -491,7 +491,7 @@ static void trace_nocontext(apr_pool_t *
      */
 
 #ifdef EXAMPLE_LOG_EACH
-    ap_log_perror(file, line, APLOG_NOTICE, 0, p, "%s", note);
+    ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_NOTICE, 0, p, "%s", note);
 #endif
 }
 

Modified: httpd/httpd/trunk/modules/lua/lua_config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/lua_config.c?rev=951894&r1=951893&r2=951894&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/lua_config.c (original)
+++ httpd/httpd/trunk/modules/lua/lua_config.c Sun Jun  6 16:56:08 2010
@@ -172,7 +172,7 @@ static int cmd_log_at(lua_State *L, int 
     lua_getinfo(L, "Sl", &dbg);
 
     msg = luaL_checkstring(L, 2);
-    ap_log_error(dbg.source, dbg.currentline, level, 0, cmd->server, msg);
+    ap_log_error(dbg.source, dbg.currentline, APLOG_MODULE_INDEX, level, 0, cmd->server,
msg);
     return 0;
 }
 

Modified: httpd/httpd/trunk/modules/lua/lua_request.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/lua_request.c?rev=951894&r1=951893&r2=951894&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/lua_request.c (original)
+++ httpd/httpd/trunk/modules/lua/lua_request.c Sun Jun  6 16:56:08 2010
@@ -405,7 +405,7 @@ static int req_log_at(lua_State *L, int 
     lua_getinfo(L, "Sl", &dbg);
 
     msg = luaL_checkstring(L, 2);
-    ap_log_rerror(dbg.source, dbg.currentline, level, 0, r, msg);
+    ap_log_rerror(dbg.source, dbg.currentline, APLOG_MODULE_INDEX, level, 0, r, msg);
     return 0;
 }
 

Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_log.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_engine_log.c?rev=951894&r1=951893&r2=951894&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_engine_log.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_engine_log.c Sun Jun  6 16:56:08 2010
@@ -93,7 +93,7 @@ void ssl_log_ssl_error(const char *file,
         ERR_error_string_n(e, err, sizeof err);
         annotation = ssl_log_annotation(err);
 
-        ap_log_error(file, line, level, 0, s,
+        ap_log_error(file, line, APLOG_MODULE_INDEX, level, 0, s,
                      "SSL Library Error: %s%s%s%s%s%s",
                      /* %s */
                      err, 
@@ -117,7 +117,7 @@ void ssl_log_cxerror(const char *file, i
     char *sname, *iname, *serial;
     BIGNUM *bn;
     
-    if (mySrvFromConn(c)->loglevel < level) {
+    if (APLOG_IS_LEVEL(mySrvFromConn(c),level)) {
         /* Bail early since the rest of this function is expensive. */
         return;
     }
@@ -131,7 +131,7 @@ void ssl_log_cxerror(const char *file, i
     apr_vsnprintf(buf, sizeof buf, format, ap);
     va_end(ap);
 
-    ap_log_cerror(file, line, level, rv, c, 
+    ap_log_cerror(file, line, APLOG_MODULE_INDEX, level, rv, c,
                   "%s [subject: %s, issuer: %s, serial: %s]",
                   buf,
                   sname ? sname : "-unknown-",

Modified: httpd/httpd/trunk/modules/ssl/ssl_private.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_private.h?rev=951894&r1=951893&r2=951894&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_private.h (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_private.h Sun Jun  6 16:56:08 2010
@@ -69,6 +69,8 @@
 #include <unistd.h> /* needed for STDIN_FILENO et.al., at least on FreeBSD */
 #endif
 
+APLOG_USE_MODULE(ssl);
+
 /*
  * Provide reasonable default for some defines
  */

Modified: httpd/httpd/trunk/modules/ssl/ssl_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_util.c?rev=951894&r1=951893&r2=951894&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_util.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_util.c Sun Jun  6 16:56:08 2010
@@ -397,18 +397,18 @@ static struct CRYPTO_dynlock_value *ssl_
      */
     rv = apr_pool_create(&p, dynlockpool);
     if (rv != APR_SUCCESS) {
-        ap_log_perror(file, line, APLOG_ERR, rv, dynlockpool, 
+        ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_ERR, rv, dynlockpool,
                        "Failed to create subpool for dynamic lock");
         return NULL;
     }
 
-    ap_log_perror(file, line, APLOG_DEBUG, 0, p, 
+    ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_DEBUG, 0, p,
                   "Creating dynamic lock");
     
     value = (struct CRYPTO_dynlock_value *)apr_palloc(p, 
                                                       sizeof(struct CRYPTO_dynlock_value));
     if (!value) {
-        ap_log_perror(file, line, APLOG_ERR, 0, p, 
+        ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_ERR, 0, p,
                       "Failed to allocate dynamic lock structure");
         return NULL;
     }
@@ -421,7 +421,7 @@ static struct CRYPTO_dynlock_value *ssl_
     rv = apr_thread_mutex_create(&(value->mutex), APR_THREAD_MUTEX_DEFAULT, 
                                 p);
     if (rv != APR_SUCCESS) {
-        ap_log_perror(file, line, APLOG_ERR, rv, p, 
+        ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_ERR, rv, p,
                       "Failed to create thread mutex for dynamic lock");
         apr_pool_destroy(p);
         return NULL;
@@ -439,17 +439,17 @@ static void ssl_dyn_lock_function(int mo
     apr_status_t rv;
 
     if (mode & CRYPTO_LOCK) {
-        ap_log_perror(file, line, APLOG_DEBUG, 0, l->pool, 
+        ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_DEBUG, 0, l->pool,
                       "Acquiring mutex %s:%d", l->file, l->line);
         rv = apr_thread_mutex_lock(l->mutex);
-        ap_log_perror(file, line, APLOG_DEBUG, rv, l->pool, 
+        ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_DEBUG, rv, l->pool,
                       "Mutex %s:%d acquired!", l->file, l->line);
     }
     else {
-        ap_log_perror(file, line, APLOG_DEBUG, 0, l->pool, 
+        ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_DEBUG, 0, l->pool,
                       "Releasing mutex %s:%d", l->file, l->line);
         rv = apr_thread_mutex_unlock(l->mutex);
-        ap_log_perror(file, line, APLOG_DEBUG, rv, l->pool, 
+        ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_DEBUG, rv, l->pool,
                       "Mutex %s:%d released!", l->file, l->line);
     }
 }
@@ -462,11 +462,11 @@ static void ssl_dyn_destroy_function(str
 {
     apr_status_t rv;
 
-    ap_log_perror(file, line, APLOG_DEBUG, 0, l->pool, 
+    ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_DEBUG, 0, l->pool,
                   "Destroying dynamic lock %s:%d", l->file, l->line);
     rv = apr_thread_mutex_destroy(l->mutex);
     if (rv != APR_SUCCESS) {
-        ap_log_perror(file, line, APLOG_ERR, rv, l->pool, 
+        ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_ERR, rv, l->pool,
                       "Failed to destroy mutex for dynamic lock %s:%d", 
                       l->file, l->line);
     }



Mime
View raw message