summaryrefslogtreecommitdiff
path: root/modules/core
diff options
context:
space:
mode:
authorJim Jagielski <jim@apache.org>2015-12-29 15:38:29 +0000
committerJim Jagielski <jim@apache.org>2015-12-29 15:38:29 +0000
commitcdb2aea61fc9009efce16d28b8ae08ffea905f98 (patch)
tree4d469aece09cd581c192f4552385c4c11a1eefb5 /modules/core
parent4bfe0a6bba57b8f44aaea3d0ea32d12fd3da761a (diff)
downloadhttpd-cdb2aea61fc9009efce16d28b8ae08ffea905f98.tar.gz
Update w/ better logging
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1722154 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/core')
-rw-r--r--modules/core/mod_watchdog.c33
1 files changed, 25 insertions, 8 deletions
diff --git a/modules/core/mod_watchdog.c b/modules/core/mod_watchdog.c
index dfdff2f94c..2bb2506c64 100644
--- a/modules/core/mod_watchdog.c
+++ b/modules/core/mod_watchdog.c
@@ -155,8 +155,8 @@ static void* APR_THREAD_FUNC wd_worker(apr_thread_t *thread, void *data)
if (w->is_running) {
watchdog_list_t *wl = w->callbacks;
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, wd_server_conf->s,
- "%sWatchdog (%s) running",
- w->singleton ? "Singleton" : "", w->name);
+ APLOGNO(02972) "%sWatchdog (%s) running",
+ w->singleton ? "Singleton " : "", w->name);
apr_time_clock_hires(w->pool);
if (wl) {
apr_pool_t *ctx = NULL;
@@ -251,8 +251,8 @@ static void* APR_THREAD_FUNC wd_worker(apr_thread_t *thread, void *data)
}
}
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, wd_server_conf->s,
- "%sWatchdog (%s) stopping",
- w->singleton ? "Singleton" : "", w->name);
+ APLOGNO(02973) "%sWatchdog (%s) stopping",
+ w->singleton ? "Singleton " : "", w->name);
if (locked)
apr_proc_mutex_unlock(w->mutex);
@@ -456,11 +456,16 @@ static int wd_post_config_hook(apr_pool_t *pconf, apr_pool_t *plog,
const ap_list_provider_names_t *wn;
int i;
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02974)
+ "Watchdog: found parent providers.");
+
wn = (ap_list_provider_names_t *)wl->elts;
for (i = 0; i < wl->nelts; i++) {
ap_watchdog_t *w = ap_lookup_provider(AP_WATCHDOG_PGROUP,
wn[i].provider_name,
AP_WATCHDOG_PVERSION);
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02975)
+ "Watchdog: Looking for parent (%s).", wn[i].provider_name);
if (w) {
if (!w->active) {
int status = ap_run_watchdog_need(s, w->name, 1,
@@ -481,6 +486,8 @@ static int wd_post_config_hook(apr_pool_t *pconf, apr_pool_t *plog,
"Watchdog: Failed to create parent worker thread.");
return rv;
}
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, s, APLOGNO(02976)
+ "Watchdog: Created parent worker thread (%s).", w->name);
wd_server_conf->parent_workers++;
}
}
@@ -495,13 +502,17 @@ static int wd_post_config_hook(apr_pool_t *pconf, apr_pool_t *plog,
AP_WATCHDOG_CVERSION))) {
const ap_list_provider_names_t *wn;
int i;
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02977)
+ "Watchdog: found child providers.");
wn = (ap_list_provider_names_t *)wl->elts;
for (i = 0; i < wl->nelts; i++) {
ap_watchdog_t *w = ap_lookup_provider(AP_WATCHDOG_PGROUP,
wn[i].provider_name,
AP_WATCHDOG_CVERSION);
- if (w) {
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02978)
+ "Watchdog: Looking for child (%s).", wn[i].provider_name);
+ if (w) {
if (!w->active) {
int status = ap_run_watchdog_need(s, w->name, 0,
w->singleton);
@@ -524,7 +535,9 @@ static int wd_post_config_hook(apr_pool_t *pconf, apr_pool_t *plog,
return rv;
}
}
- wd_server_conf->child_workers++;
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, s, APLOGNO(02979)
+ "Watchdog: Created child worker thread (%s).", w->name);
+ wd_server_conf->child_workers++;
}
}
}
@@ -540,13 +553,15 @@ static int wd_post_config_hook(apr_pool_t *pconf, apr_pool_t *plog,
/*--------------------------------------------------------------------------*/
static void wd_child_init_hook(apr_pool_t *p, server_rec *s)
{
- apr_status_t rv;
+ apr_status_t rv = OK;
const apr_array_header_t *wl;
if (!wd_server_conf->child_workers) {
/* We don't have anything configured, bail out.
*/
- return;
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, s, APLOGNO(02980)
+ "Watchdog: nothing configured?");
+ return;
}
if ((wl = ap_list_provider_names(p, AP_WATCHDOG_PGROUP,
AP_WATCHDOG_CVERSION))) {
@@ -567,6 +582,8 @@ static void wd_child_init_hook(apr_pool_t *p, server_rec *s)
/* No point to continue */
return;
}
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, s, APLOGNO(02981)
+ "Watchdog: Created worker thread (%s).", wn[i].provider_name);
}
}
}