Mercurial > hg > nginx
comparison src/http/modules/ngx_http_log_module.c @ 4499:778ef9c3fd2d
Fixed spelling in single-line comments.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 28 Feb 2012 11:31:05 +0000 |
parents | 13e09cf11d4e |
children | 674227175c4c |
comparison
equal
deleted
inserted
replaced
4498:569ea17767bf | 4499:778ef9c3fd2d |
---|---|
159 NULL, /* init main configuration */ | 159 NULL, /* init main configuration */ |
160 | 160 |
161 NULL, /* create server configuration */ | 161 NULL, /* create server configuration */ |
162 NULL, /* merge server configuration */ | 162 NULL, /* merge server configuration */ |
163 | 163 |
164 ngx_http_log_create_loc_conf, /* create location configration */ | 164 ngx_http_log_create_loc_conf, /* create location configuration */ |
165 ngx_http_log_merge_loc_conf /* merge location configration */ | 165 ngx_http_log_merge_loc_conf /* merge location configuration */ |
166 }; | 166 }; |
167 | 167 |
168 | 168 |
169 ngx_module_t ngx_http_log_module = { | 169 ngx_module_t ngx_http_log_module = { |
170 NGX_MODULE_V1, | 170 NGX_MODULE_V1, |
375 | 375 |
376 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); | 376 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); |
377 | 377 |
378 if (!r->root_tested) { | 378 if (!r->root_tested) { |
379 | 379 |
380 /* test root directory existance */ | 380 /* test root directory existence */ |
381 | 381 |
382 if (ngx_http_map_uri_to_path(r, &path, &root, 0) == NULL) { | 382 if (ngx_http_map_uri_to_path(r, &path, &root, 0) == NULL) { |
383 /* simulate successfull logging */ | 383 /* simulate successful logging */ |
384 return len; | 384 return len; |
385 } | 385 } |
386 | 386 |
387 path.data[root] = '\0'; | 387 path.data[root] = '\0'; |
388 | 388 |
402 | 402 |
403 if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool) | 403 if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool) |
404 != NGX_OK) | 404 != NGX_OK) |
405 { | 405 { |
406 if (of.err == 0) { | 406 if (of.err == 0) { |
407 /* simulate successfull logging */ | 407 /* simulate successful logging */ |
408 return len; | 408 return len; |
409 } | 409 } |
410 | 410 |
411 ngx_log_error(NGX_LOG_ERR, r->connection->log, of.err, | 411 ngx_log_error(NGX_LOG_ERR, r->connection->log, of.err, |
412 "testing \"%s\" existence failed", path.data); | 412 "testing \"%s\" existence failed", path.data); |
413 | 413 |
414 /* simulate successfull logging */ | 414 /* simulate successful logging */ |
415 return len; | 415 return len; |
416 } | 416 } |
417 | 417 |
418 if (!of.is_dir) { | 418 if (!of.is_dir) { |
419 ngx_log_error(NGX_LOG_ERR, r->connection->log, NGX_ENOTDIR, | 419 ngx_log_error(NGX_LOG_ERR, r->connection->log, NGX_ENOTDIR, |
420 "testing \"%s\" existence failed", path.data); | 420 "testing \"%s\" existence failed", path.data); |
421 | 421 |
422 /* simulate successfull logging */ | 422 /* simulate successful logging */ |
423 return len; | 423 return len; |
424 } | 424 } |
425 } | 425 } |
426 | 426 |
427 if (ngx_http_script_run(r, &log, script->lengths->elts, 1, | 427 if (ngx_http_script_run(r, &log, script->lengths->elts, 1, |
428 script->values->elts) | 428 script->values->elts) |
429 == NULL) | 429 == NULL) |
430 { | 430 { |
431 /* simulate successfull logging */ | 431 /* simulate successful logging */ |
432 return len; | 432 return len; |
433 } | 433 } |
434 | 434 |
435 log.data[log.len - 1] = '\0'; | 435 log.data[log.len - 1] = '\0'; |
436 *name = log.data; | 436 *name = log.data; |
455 if (ngx_open_cached_file(llcf->open_file_cache, &log, &of, r->pool) | 455 if (ngx_open_cached_file(llcf->open_file_cache, &log, &of, r->pool) |
456 != NGX_OK) | 456 != NGX_OK) |
457 { | 457 { |
458 ngx_log_error(NGX_LOG_CRIT, r->connection->log, ngx_errno, | 458 ngx_log_error(NGX_LOG_CRIT, r->connection->log, ngx_errno, |
459 "%s \"%s\" failed", of.failed, log.data); | 459 "%s \"%s\" failed", of.failed, log.data); |
460 /* simulate successfull logging */ | 460 /* simulate successful logging */ |
461 return len; | 461 return len; |
462 } | 462 } |
463 | 463 |
464 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | 464 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
465 "http log #%d", of.fd); | 465 "http log #%d", of.fd); |