From 27dc42160fa2acbc3e5894068f28808c70ca3f44 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Wed, 25 Jul 2018 15:29:57 +0200 Subject: log.c: format: padding - milliseconds: leading zeroes - PID: whitespace padding --- src/nvim/log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/log.c b/src/nvim/log.c index 289b95b227..e485d4c338 100644 --- a/src/nvim/log.c +++ b/src/nvim/log.c @@ -285,10 +285,10 @@ static bool v_do_log_to_file(FILE *log_file, int log_level, // Print the log message. int64_t pid = os_get_pid(); int rv = (line_num == -1 || func_name == NULL) - ? fprintf(log_file, "%s %s.%-3d %" PRId64 " %s", + ? fprintf(log_file, "%s %s.%03d %-5" PRId64 " %s", log_levels[log_level], date_time, millis, pid, (context == NULL ? "?:" : context)) - : fprintf(log_file, "%s %s.%-3d %" PRId64 " %s%s:%d: ", + : fprintf(log_file, "%s %s.%03d %-5" PRId64 " %s%s:%d: ", log_levels[log_level], date_time, millis, pid, (context == NULL ? "" : context), func_name, line_num); -- cgit