I have this code in the apache module I'm working on, which is registered with ap_hook_child_init ():
static class_name *mc; static void child_init(apr_pool_t *pool, server_rec *s) { ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, "this pointer should be null: %pp", mc); mc = mc_alloc(); ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, "this pointer should not be null: %pp", mc); }
Problem: I do not see these log messages!
I am sure that this function is called and that the mc_alloc() call works, because when I register from other parts of the modules (for example, in the request handler), I see the log messages and get a valid result for the pointer. It also tells me that logging works.
Is my code wrong or my expectations? Can't issue a log message during ap_hook_child_init callback? If not, how else can I register that the child was init'ed?
source share