func translateLogLevel() havener.LogLevel {
	logLevel := havener.Off
	fatalLevel := viper.GetBool("fatal")
	errorLevel := viper.GetBool("error")
	warnLevel := viper.GetBool("warn")
	verboseLevel := viper.GetBool("verbose")
	debugLevel := viper.GetBool("debug")
	traceLevel := viper.GetBool("trace")
	if fatalLevel && havener.Fatal > logLevel {
		logLevel = havener.Fatal
	}
	if errorLevel && havener.Error > logLevel {
		logLevel = havener.Error
	}
	if warnLevel && havener.Warn > logLevel {
		logLevel = havener.Warn
	}
	if verboseLevel && havener.Verbose > logLevel {
		logLevel = havener.Verbose
	}
	if debugLevel && havener.Debug > logLevel {
		logLevel = havener.Debug
	}
	if traceLevel && havener.Trace > logLevel {
		logLevel = havener.Trace
	}
	return logLevel
}
translateLogLevel transates the flag boolean to
the associated log level.
Levels: Fatal < Error < Warn < Verbose < Debug < Trace
package cmd
import (
	"github.com/gonvenience/wait"
	"github.com/gonvenience/bunt"
	"github.com/homeport/havener/pkg/havener"
	"github.com/spf13/viper"
)
var progressIndicator *wait.ProgressIndicator
func LogTask() {
	channel := havener.GetLogChannel()
	for {
		message := <-channel
		targetLevel := translateLogLevel()
		log(message, targetLevel)
	}
}
func setCurrentProgressIndicator(pi *wait.ProgressIndicator) {
	progressIndicator = pi
}