// parseLogLevel is a helper function to parse the log level passed in the
// configuration into a logrus Level, or to use the default log level set
// above if the log level can't be parsed.
parseLogLevel is a helper function to parse the log level passed in the
configuration into a logrus Level, or to use the default log level set
above if the log level can't be parsed.
// parseLogLevel is a helper function to parse the log level passed in the // configuration into a logrus Level or to use the default log level set // above if the log level can ' t be parsed .
func parseLogLevel(level string) logrus.Level {
	if level == "" {
		return defaultLogLevel
	}
	ll, err := logrus.ParseLevel(level)
	if err != nil {
		fmt.Printf("Failed to parse log level, using default. Error: %v\n", err)
		return defaultLogLevel
	}
	return ll
}
func parseLogLevel ( level string ) logrus . Level { if level == " " { return defaultLogLevel } ll , err := logrus . ParseLevel ( level ) if err != nil { fmt . Printf ( " \n " , err ) return defaultLogLevel } return ll }
parseLogLevel is a helper function to parse the log level passed in the
configuration into a logrus Level, or to use the default log level set
above if the log level can't be parsed.
parseLogLevel is a helper function to parse the log level passed in the configuration into a logrus Level or to use the default log level set above if the log level can ' t be parsed .