Deleted
Added
nxt_log.c (1:fdc027c56872) | nxt_log.c (564:762f8c976ead) |
---|---|
1 2/* 3 * Copyright (C) Igor Sysoev 4 * Copyright (C) NGINX, Inc. 5 */ 6 7#include <nxt_main.h> 8 --- 6 unchanged lines hidden (view full) --- 15 NXT_LOG_INFO, 16 0, 17 nxt_log_handler, 18 NULL, 19 NULL 20}; 21 22 | 1 2/* 3 * Copyright (C) Igor Sysoev 4 * Copyright (C) NGINX, Inc. 5 */ 6 7#include <nxt_main.h> 8 --- 6 unchanged lines hidden (view full) --- 15 NXT_LOG_INFO, 16 0, 17 nxt_log_handler, 18 NULL, 19 NULL 20}; 21 22 |
23nxt_str_t nxt_log_levels[8] = { 24 nxt_string("emerg"), | 23nxt_str_t nxt_log_levels[6] = { |
25 nxt_string("alert"), | 24 nxt_string("alert"), |
26 nxt_string("crit"), | |
27 nxt_string("error"), 28 nxt_string("warn"), 29 nxt_string("notice"), 30 nxt_string("info"), 31 nxt_string("debug") 32}; 33 34 --- 62 unchanged lines hidden (view full) --- 97 if (p > end - NXT_LINEFEED_SIZE) { 98 p = end - NXT_LINEFEED_SIZE; 99 } 100 101 nxt_linefeed(p); 102 103 (void) nxt_write_console(nxt_stderr, msg, p - msg); 104 | 25 nxt_string("error"), 26 nxt_string("warn"), 27 nxt_string("notice"), 28 nxt_string("info"), 29 nxt_string("debug") 30}; 31 32 --- 62 unchanged lines hidden (view full) --- 95 if (p > end - NXT_LINEFEED_SIZE) { 96 p = end - NXT_LINEFEED_SIZE; 97 } 98 99 nxt_linefeed(p); 100 101 (void) nxt_write_console(nxt_stderr, msg, p - msg); 102 |
105 if (level <= NXT_LOG_ALERT) { | 103 if (level == NXT_LOG_ALERT) { |
106 *(p - NXT_LINEFEED_SIZE) = '\0'; 107 108 /* 109 * Syslog LOG_ALERT level is enough, because 110 * LOG_EMERG level broadcast a message to all users. 111 */ 112 nxt_write_syslog(LOG_ALERT, syslogmsg); 113 } 114} | 104 *(p - NXT_LINEFEED_SIZE) = '\0'; 105 106 /* 107 * Syslog LOG_ALERT level is enough, because 108 * LOG_EMERG level broadcast a message to all users. 109 */ 110 nxt_write_syslog(LOG_ALERT, syslogmsg); 111 } 112} |