comparison src/core/ngx_log.c @ 6474:2cd019520210

Style.
author Ruslan Ermilov <ru@nginx.com>
date Wed, 30 Mar 2016 11:52:16 +0300
parents 2c21bfe3da89
children 4b420f9c4c5d
comparison
equal deleted inserted replaced
6473:9d7326d3f474 6474:2cd019520210
31 #endif 31 #endif
32 32
33 33
34 static ngx_command_t ngx_errlog_commands[] = { 34 static ngx_command_t ngx_errlog_commands[] = {
35 35
36 {ngx_string("error_log"), 36 { ngx_string("error_log"),
37 NGX_MAIN_CONF|NGX_CONF_1MORE, 37 NGX_MAIN_CONF|NGX_CONF_1MORE,
38 ngx_error_log, 38 ngx_error_log,
39 0, 39 0,
40 0, 40 0,
41 NULL}, 41 NULL },
42 42
43 ngx_null_command 43 ngx_null_command
44 }; 44 };
45 45
46 46
47 static ngx_core_module_t ngx_errlog_module_ctx = { 47 static ngx_core_module_t ngx_errlog_module_ctx = {
48 ngx_string("errlog"), 48 ngx_string("errlog"),
583 new_log->file = ngx_conf_open_file(cf->cycle, &name); 583 new_log->file = ngx_conf_open_file(cf->cycle, &name);
584 if (new_log->file == NULL) { 584 if (new_log->file == NULL) {
585 return NGX_CONF_ERROR; 585 return NGX_CONF_ERROR;
586 } 586 }
587 587
588 } else if (ngx_strncmp(value[1].data, "memory:", 7) == 0) { 588 } else if (ngx_strncmp(value[1].data, "memory:", 7) == 0) {
589 589
590 #if (NGX_DEBUG) 590 #if (NGX_DEBUG)
591 size_t size, needed; 591 size_t size, needed;
592 ngx_pool_cleanup_t *cln; 592 ngx_pool_cleanup_t *cln;
593 ngx_log_memory_buf_t *buf; 593 ngx_log_memory_buf_t *buf;
642 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 642 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
643 "nginx was built without debug support"); 643 "nginx was built without debug support");
644 return NGX_CONF_ERROR; 644 return NGX_CONF_ERROR;
645 #endif 645 #endif
646 646
647 } else if (ngx_strncmp(value[1].data, "syslog:", 7) == 0) { 647 } else if (ngx_strncmp(value[1].data, "syslog:", 7) == 0) {
648 peer = ngx_pcalloc(cf->pool, sizeof(ngx_syslog_peer_t)); 648 peer = ngx_pcalloc(cf->pool, sizeof(ngx_syslog_peer_t));
649 if (peer == NULL) { 649 if (peer == NULL) {
650 return NGX_CONF_ERROR; 650 return NGX_CONF_ERROR;
651 } 651 }
652 652