Mercurial > hg > nginx
diff src/core/ngx_log.c @ 2752:2d82d3cfbfa0
change ngx_log_abort() interface
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 24 Apr 2009 15:50:51 +0000 |
parents | 9a5f7b81b937 |
children | 77264e0157ad |
line wrap: on
line diff
--- a/src/core/ngx_log.c +++ b/src/core/ngx_log.c @@ -207,10 +207,19 @@ ngx_log_debug_core(ngx_log_t *log, ngx_e #endif -void -ngx_log_abort(ngx_err_t err, const char *text, void *param) +void ngx_cdecl +ngx_log_abort(ngx_err_t err, const char *fmt, ...) { - ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, err, text, param); + u_char *p; + va_list args; + u_char errstr[NGX_MAX_CONF_ERRSTR]; + + va_start(args, fmt); + p = ngx_vsnprintf(errstr, sizeof(errstr) - 1, fmt, args); + va_end(args); + + ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, err, + "%*s", p - errstr, errstr); }