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
This commit is contained in:
Charlie Drage 2017-01-18 08:54:41 -05:00
parent c39e9b3cb0
commit 1b8a229b5a

View File

@ -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)