From 7e6a8310b73579b2fa78fb6c410c7101a9f70254 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 27 Sep 2016 21:46:55 +0200 Subject: log.c: align/adjust layout New: 2016/09/27 18:00:49 INFO 28117/tui_flush:597: ... Old: 2016/09/27 18:00:49 [info @ tui_flush:597] 28117 - ... --- src/nvim/log.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/nvim/log.c') diff --git a/src/nvim/log.c b/src/nvim/log.c index c31af6b287..bbb4dfb944 100644 --- a/src/nvim/log.c +++ b/src/nvim/log.c @@ -146,10 +146,10 @@ static bool v_do_log_to_file(FILE *log_file, int log_level, const char* fmt, va_list args) { static const char *log_levels[] = { - [DEBUG_LOG_LEVEL] = "debug", - [INFO_LOG_LEVEL] = "info", - [WARNING_LOG_LEVEL] = "warning", - [ERROR_LOG_LEVEL] = "error" + [DEBUG_LOG_LEVEL] = "DEBUG", + [INFO_LOG_LEVEL] = "INFO ", + [WARNING_LOG_LEVEL] = "WARN ", + [ERROR_LOG_LEVEL] = "ERROR" }; assert(log_level >= DEBUG_LOG_LEVEL && log_level <= ERROR_LOG_LEVEL); @@ -166,8 +166,8 @@ static bool v_do_log_to_file(FILE *log_file, int log_level, // print the log message prefixed by the current timestamp and pid int64_t pid = os_get_pid(); - if (fprintf(log_file, "%s [%s @ %s:%d] %" PRId64 " - ", date_time, - log_levels[log_level], func_name, line_num, pid) < 0) { + if (fprintf(log_file, "%s %s %" PRId64 "/%s:%d: ", date_time, + log_levels[log_level], pid, func_name, line_num) < 0) { return false; } if (vfprintf(log_file, fmt, args) < 0) { -- cgit