mirror of
https://github.com/nginx/nginx.git
synced 2024-12-20 14:13:33 -06:00
change ngx_log_abort() interface
This commit is contained in:
parent
03c779451c
commit
c27497da92
@ -207,10 +207,19 @@ ngx_log_debug_core(ngx_log_t *log, ngx_err_t err, const char *fmt, ...)
|
||||
#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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -198,7 +198,7 @@ void ngx_cdecl ngx_log_debug_core(ngx_log_t *log, ngx_err_t err,
|
||||
ngx_log_t *ngx_log_init(void);
|
||||
ngx_log_t *ngx_log_create_errlog(ngx_cycle_t *cycle, ngx_str_t *name);
|
||||
char *ngx_set_error_log_levels(ngx_conf_t *cf, ngx_log_t *log);
|
||||
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, ...);
|
||||
void ngx_cdecl ngx_log_stderr(ngx_err_t err, const char *fmt, ...);
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user