From 7d4da6eaa7cf420b1808652cb44763e259634001 Mon Sep 17 00:00:00 2001 From: Feoramund <161657516+Feoramund@users.noreply.github.com> Date: Thu, 23 May 2024 16:29:18 -0400 Subject: [PATCH] Fix trailing space with only `.Date` log option --- core/log/file_console_logger.odin | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/log/file_console_logger.odin b/core/log/file_console_logger.odin index 99ca1f51a..6843d3a63 100644 --- a/core/log/file_console_logger.odin +++ b/core/log/file_console_logger.odin @@ -123,7 +123,12 @@ do_time_header :: proc(opts: Options, buf: ^strings.Builder, t: time.Time) { fmt.sbprint(buf, "[") y, m, d := time.date(t) h, min, s := time.clock(t) - if .Date in opts { fmt.sbprintf(buf, "%d-%02d-%02d ", y, m, d) } + if .Date in opts { + fmt.sbprintf(buf, "%d-%02d-%02d", y, m, d) + if .Time in opts { + fmt.sbprint(buf, " ") + } + } if .Time in opts { fmt.sbprintf(buf, "%02d:%02d:%02d", h, min, s) } fmt.sbprint(buf, "] ") }