summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_app_log.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2018-06-25 16:56:45 +0300
committerIgor Sysoev <igor@sysoev.ru>2018-06-25 16:56:45 +0300
commit606eda045bc3608977648fb1de61d8e328984d30 (patch)
treecb24949d225133bd34f243e2445d7ba9cadfcbdf /src/nxt_app_log.c
parent1a52d876f7e10d07f58deee6faeaf70a11a6110f (diff)
downloadunit-606eda045bc3608977648fb1de61d8e328984d30.tar.gz
unit-606eda045bc3608977648fb1de61d8e328984d30.tar.bz2
Removed '\r' and '\n' artifact macros.
Diffstat (limited to 'src/nxt_app_log.c')
-rw-r--r--src/nxt_app_log.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nxt_app_log.c b/src/nxt_app_log.c
index 16649ecf..83eac371 100644
--- a/src/nxt_app_log.c
+++ b/src/nxt_app_log.c
@@ -71,16 +71,16 @@ nxt_log_time_handler(nxt_uint_t level, nxt_log_t *log, const char *fmt, ...)
p = log->ctx_handler(log->ctx, p, end);
}
- if (p > end - NXT_LINEFEED_SIZE) {
- p = end - NXT_LINEFEED_SIZE;
+ if (p > end - nxt_length("\n")) {
+ p = end - nxt_length("\n");
}
- nxt_linefeed(p);
+ *p++ = '\n';
(void) nxt_write_console(nxt_stderr, msg, p - msg);
if (level == NXT_LOG_ALERT) {
- *(p - NXT_LINEFEED_SIZE) = '\0';
+ *(p - nxt_length("\n")) = '\0';
/*
* The syslog LOG_ALERT level is enough, because