Skip to content

kismia/logruspflag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

logLevel := logrus.InfoLevel

cmd := &cobra.Command{
    Use: "my-command",
    RunE: func(cmd *cobra.Command, args []string) error {
        
        logrus.SetLevel(logLevel)
        
        return cmd.Usage()
    },
}

logruspflag.LevelVar(cmd.Flags(), &logLevel, "log-level", logLevel, "Log level")

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages