From 1b8a229b5a3316d37d08a00e0e057c173e31a98c Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Wed, 18 Jan 2017 08:54:41 -0500 Subject: [PATCH] Disables timestamp with logging This commit disables the timestamp when outputting logs in order to be more clean / concise. One of the reasons being that the kompose up / convert / down commands are *too fast* and thus output's all [0000]. For example, the output will look like this: INFO I'm a little teapot Instead of: INFO[0000] I'm a little teapot --- cmd/root.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/root.go b/cmd/root.go index ad87e71e..b7920707 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -64,6 +64,12 @@ var RootCmd = &cobra.Command{ logrus.SetLevel(logrus.DebugLevel) } + // Disable the timestamp (Kompose is too fast!) + formatter := new(logrus.TextFormatter) + formatter.DisableTimestamp = true + formatter.ForceColors = true + logrus.SetFormatter(formatter) + // Set the appropriate suppress warnings and error on warning flags if GlobalSuppressWarnings { logrus.SetLevel(logrus.ErrorLevel)