Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "arke", Short: "TBD", PersistentPreRunE: func(cmd *cobra.Command, args []string) error { lvl := zap.NewAtomicLevel() if viper.GetBool("verbose") { lvl.SetLevel(zap.DebugLevel) } else if viper.IsSet("log.level") { switch viper.GetString("log.level") { case "debug": lvl.SetLevel(zap.DebugLevel) case "warn": lvl.SetLevel(zap.WarnLevel) case "dpanic": lvl.SetLevel(zap.DPanicLevel) case "error": lvl.SetLevel(zap.ErrorLevel) case "fatal": lvl.SetLevel(zap.FatalLevel) case "info": lvl.SetLevel(zap.InfoLevel) case "panic": lvl.SetLevel(zap.PanicLevel) default: return errors.New("Unknown Logging Level") } } var err error log, err = zap.NewProduction() log.Core().Enabled(lvl.Level()) return err }, }
RootCmd exports the main arke command interface, including all subcommands
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.