func parseLogFormat(format string) (logrus.Formatter, error) {
	switch format {
	case "json":
		return &logrus.JSONFormatter{}, nil
	case "common":
		return &logrus.TextFormatter{DisableColors: false, FullTimestamp: true, DisableSorting: true}, nil
	default:
		return nil, fmt.Errorf("invalid logging format: %s", format)
	}
}
parseLogFormat parses a log format and returns a formatter.
package cmd
import (
	"fmt"
	"os"
	"github.com/sirupsen/logrus"
)
func parseLogLevel(level string) (logrus.Level, error) {
	return logrus.ParseLevel(level)
}