summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_app_log.c
diff options
context:
space:
mode:
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