comparison 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
comparison
equal deleted inserted replaced
2751:3b9b67bc0cdc 2752:2d82d3cfbfa0
205 } 205 }
206 206
207 #endif 207 #endif
208 208
209 209
210 void 210 void ngx_cdecl
211 ngx_log_abort(ngx_err_t err, const char *text, void *param) 211 ngx_log_abort(ngx_err_t err, const char *fmt, ...)
212 { 212 {
213 ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, err, text, param); 213 u_char *p;
214 va_list args;
215 u_char errstr[NGX_MAX_CONF_ERRSTR];
216
217 va_start(args, fmt);
218 p = ngx_vsnprintf(errstr, sizeof(errstr) - 1, fmt, args);
219 va_end(args);
220
221 ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, err,
222 "%*s", p - errstr, errstr);
214 } 223 }
215 224
216 225
217 void ngx_cdecl 226 void ngx_cdecl
218 ngx_log_stderr(ngx_err_t err, const char *fmt, ...) 227 ngx_log_stderr(ngx_err_t err, const char *fmt, ...)