You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by 陈维烨 <we...@gmail.com> on 2013/06/05 04:15:17 UTC

[users@httpd] ErrorLog doesn't work well when apache shutdown

Hi,
   If we configured the ErrorLog directive piped with rotatelog, logs in
pool cleanup hook is always missing when we shutdown the apache server.

    *ErrorLog "|/usr/local/apache2/bin/rotatelogs -l
/home/echonga/log/event.log.%Y-%m-%d 86400"*

   If we don't use the rotatelog feature, it works fine.

   *ErrorLog "logs/error_log"*

   The related program is as following:

apr_status_t destory_lock(void *not_used)
   {
    *ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "enter destroy");* *//
this log is always missing*
    return APR_SUCCESS;
    }

int filerepair_post_config(apr_pool_t *pconf, apr_pool_t *plog,
                             apr_pool_t *ptemp, server_rec *s){
    apr_pool_cleanup_register(pconf, NULL, destory_lock,
apr_pool_cleanup_null);
       return APR_SUCCESS;

}

Any comments or suggestion on this issue is welcome.

Thank you in advance.

BRs//Weiye Chen