From 0d07397ba7dbdd60792917c339e556997ba6ca83 Mon Sep 17 00:00:00 2001 From: Johannes Brunswicker Date: Wed, 3 Apr 2024 09:10:22 +0200 Subject: [PATCH] added color to logging output --- lib/logging.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logging.go b/lib/logging.go index 1f990e26..da66fa6d 100644 --- a/lib/logging.go +++ b/lib/logging.go @@ -12,7 +12,7 @@ func GetLogger() *logging.Logger { logger := logging.MustGetLogger("tfswitch") logBackend := logging.NewLogBackend(os.Stdout, "", 0) - format := logging.MustStringFormatter("%{time:15:04:05.000} %{shortfunc}: %{level} %{message}") + format := logging.MustStringFormatter("%{color}%{time:15:04:05.000} %{shortfunc}: %{level}%{color:reset} %{message}") backendFormatter := logging.NewBackendFormatter(logBackend, format) logging.SetBackend(backendFormatter) return logger