Skip to content

Commit 8ae0035

Browse files
committed
Tweak log messages
1 parent 73c8a91 commit 8ae0035

File tree

4 files changed

+152
-128
lines changed

4 files changed

+152
-128
lines changed

native/advertise/mod_advertise.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -581,8 +581,8 @@ static int post_config_hook(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte
581581
if (ppid) {
582582
ma_parent_pid = atol(ppid);
583583
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
584-
"[%" APR_PID_T_FMT " - %" APR_PID_T_FMT "] in child post config hook", getpid(),
585-
ma_parent_pid);
584+
"post_config_hook: [%" APR_PID_T_FMT " - %" APR_PID_T_FMT "] in child post config hook",
585+
getpid(), ma_parent_pid);
586586
return OK;
587587
}
588588
}
@@ -608,7 +608,7 @@ static int post_config_hook(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte
608608
rv = ma_group_join(mconf->ma_advertise_adrs, mconf->ma_advertise_port, mconf->ma_bind_adrs, mconf->ma_bind_port,
609609
pconf, s);
610610
if (rv != APR_SUCCESS) {
611-
ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, "mod_advertise: multicast join failed for %s:%d.",
611+
ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, "post_config_hook: multicast join failed for %s:%d.",
612612
mconf->ma_advertise_adrs, mconf->ma_advertise_port);
613613
ma_advertise_run = 0;
614614
} else {
@@ -651,23 +651,23 @@ static int post_config_hook(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte
651651
rv = apr_parse_addr_port(&mconf->ma_advertise_srvs, &mconf->ma_advertise_srvi, &mconf->ma_advertise_srvp, ptr,
652652
pproc);
653653
if (rv != APR_SUCCESS || !mconf->ma_advertise_srvs || !mconf->ma_advertise_srvp) {
654-
ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, "mod_advertise: Invalid ServerAdvertise Address %s", ptr);
654+
ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, "post_config_hook: Invalid ServerAdvertise Address %s", ptr);
655655
return rv;
656656
}
657657
}
658658

659659
/* prevent X-Manager-Address: (null):0 */
660660
if (!mconf->ma_advertise_srvs || !mconf->ma_advertise_srvp) {
661661
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
662-
"mod_advertise: ServerAdvertise Address or Port not defined, Advertise disabled!!!");
662+
"post_config_hook: ServerAdvertise Address or Port not defined, Advertise disabled!!!");
663663
return OK;
664664
}
665665

666666
/* Create parent management thread */
667667
is_mp_running = 1;
668668
rv = apr_thread_create(&tp, NULL, parent_thread, server, pconf);
669669
if (rv != APR_SUCCESS) {
670-
ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, "mod_advertise: parent apr_thread_create");
670+
ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, "post_config_hook: parent apr_thread_create");
671671
return rv;
672672
}
673673
apr_thread_detach(tp);
@@ -678,7 +678,8 @@ static int post_config_hook(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte
678678
apr_pool_create(&magd->cpool, pconf);
679679
apr_pool_cleanup_register(magd->cpool, magd, pconfig_cleanup, apr_pool_cleanup_null);
680680

681-
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, "Advertise initialized for process %" APR_PID_T_FMT, getpid());
681+
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, "post_config_hook: Advertise initialized for process %" APR_PID_T_FMT,
682+
getpid());
682683

683684
apr_pool_cleanup_register(magd->ppool, magd, process_cleanup, apr_pool_cleanup_null);
684685

native/balancers/mod_lbmethod_cluster.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,17 +395,20 @@ static int lbmethod_cluster_post_config(apr_pool_t *p, apr_pool_t *plog, apr_poo
395395
mc_watchdog_get_instance = APR_RETRIEVE_OPTIONAL_FN(ap_watchdog_get_instance);
396396
mc_watchdog_register_callback = APR_RETRIEVE_OPTIONAL_FN(ap_watchdog_register_callback);
397397
if (!mc_watchdog_get_instance || !mc_watchdog_register_callback) {
398-
ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(03262) "mod_watchdog is required");
398+
ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
399+
APLOGNO(03262) "proxy_cluster_post_config: mod_watchdog is required");
399400
return !OK;
400401
}
401402
if (mc_watchdog_get_instance(&watchdog, LB_CLUSTER_WATHCHDOG_NAME, 0, 1, p)) {
402-
ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(03263) "Failed to create watchdog instance (%s)",
403+
ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
404+
APLOGNO(03263) "proxy_cluster_post_config: Failed to create watchdog instance (%s)",
403405
LB_CLUSTER_WATHCHDOG_NAME);
404406
return !OK;
405407
}
406408
while (s) {
407409
if (mc_watchdog_register_callback(watchdog, AP_WD_TM_SLICE, s, mc_watchdog_callback)) {
408-
ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(03264) "Failed to register watchdog callback (%s)",
410+
ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
411+
APLOGNO(03264) "proxy_cluster_post_config: Failed to register watchdog callback (%s)",
409412
LB_CLUSTER_WATHCHDOG_NAME);
410413
return !OK;
411414
}

0 commit comments

Comments
 (0)