Mercurial > hg > nginx-quic
comparison src/core/ngx_log.c @ 113:d7f606e25b99
nginx-0.0.1-2003-07-04-19:10:33 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 04 Jul 2003 15:10:33 +0000 |
parents | a9bc21d63fe4 |
children | be27f922b9a2 |
comparison
equal
deleted
inserted
replaced
112:da763a85be66 | 113:d7f606e25b99 |
---|---|
208 } | 208 } |
209 | 209 |
210 #endif | 210 #endif |
211 | 211 |
212 | 212 |
213 static char *ngx_set_error_log(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) | |
214 { | |
215 return ngx_log_set_errlog(cf, cmd, &ngx_log); | |
216 } | |
217 | |
218 | |
219 | 213 |
220 ngx_log_t *ngx_log_init_errlog() | 214 ngx_log_t *ngx_log_init_errlog() |
221 { | 215 { |
222 #if (WIN32) | 216 #if (WIN32) |
223 | 217 |
250 { | 244 { |
251 ngx_log_t *log; | 245 ngx_log_t *log; |
252 | 246 |
253 ngx_test_null(log, ngx_pcalloc(cycle->pool, sizeof(ngx_log_t)), NULL); | 247 ngx_test_null(log, ngx_pcalloc(cycle->pool, sizeof(ngx_log_t)), NULL); |
254 ngx_test_null(log->file, ngx_push_array(&cycle->open_files), NULL); | 248 ngx_test_null(log->file, ngx_push_array(&cycle->open_files), NULL); |
249 log->file->fd = NGX_INVALID_FILE; | |
255 | 250 |
256 return log; | 251 return log; |
257 } | 252 } |
258 | 253 |
254 | |
255 static char *ngx_set_error_log(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) | |
256 { | |
257 ngx_str_t *value; | |
258 | |
259 value = cf->args->elts; | |
260 | |
261 if (value[1].len == 6 && ngx_strcmp(value[1].data, "stderr") == 0) { | |
262 cf->cycle->log->file = &ngx_stderr; | |
263 | |
264 } else { | |
265 cf->cycle->log->file->name = value[1]; | |
266 } | |
267 | |
268 return NGX_CONF_OK; | |
269 } | |
270 | |
271 | |
272 #if 0 | |
259 | 273 |
260 char *ngx_log_set_errlog(ngx_conf_t *cf, ngx_command_t *cmd, ngx_log_t *log) | 274 char *ngx_log_set_errlog(ngx_conf_t *cf, ngx_command_t *cmd, ngx_log_t *log) |
261 { | 275 { |
262 int len; | 276 int len; |
263 ngx_err_t err; | 277 ngx_err_t err; |
295 } | 309 } |
296 #endif | 310 #endif |
297 | 311 |
298 return NGX_CONF_OK; | 312 return NGX_CONF_OK; |
299 } | 313 } |
314 | |
315 #endif |