Klaus Demo nginx / c19b848
add "nginx: " prefix when logging to the stderr Igor Sysoev 11 years ago
1 changed file(s) with 7 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
147147 return;
148148 }
149149
150 msg -= (err_levels[level].len + 4);
151
152 (void) ngx_sprintf(msg, "[%V]: ", &err_levels[level]);
150 msg -= (7 + err_levels[level].len + 4);
151
152 (void) ngx_sprintf(msg, "nginx: [%V]: ", &err_levels[level]);
153153
154154 (void) ngx_write_console(ngx_stderr, msg, p - msg);
155155 }
208208 u_char errstr[NGX_MAX_ERROR_STR];
209209
210210 last = errstr + NGX_MAX_ERROR_STR;
211 p = errstr + 7;
212
213 ngx_memcpy(errstr, "nginx: ", 7);
211214
212215 va_start(args, fmt);
213 p = ngx_vslprintf(errstr, last, fmt, args);
216 p = ngx_vslprintf(p, last, fmt, args);
214217 va_end(args);
215218
216219 if (err) {