diff options
| author | Fuwn <[email protected]> | 2024-10-12 06:54:41 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-10-12 06:54:41 -0700 |
| commit | 8f4f831aafefab916db253a6d8e2d5fe6fd3880c (patch) | |
| tree | 98fdc30610cde1fc83bd42698f92d7fb405d3a9e /yae.go | |
| parent | 40f9bc9d441c78214540240413ad74807c28e30b (diff) | |
| download | yae-8f4f831aafefab916db253a6d8e2d5fe6fd3880c.tar.xz yae-8f4f831aafefab916db253a6d8e2d5fe6fd3880c.zip | |
feat(yae): extra log level flags
Diffstat (limited to 'yae.go')
| -rw-r--r-- | yae.go | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -37,6 +37,24 @@ func main() { Value: "./yae.json", Usage: "Sources path", }, + &cli.BoolFlag{ + Name: "debug", + Usage: "Enable debug output", + Action: func(*cli.Context, bool) error { + log.SetLevel(log.DebugLevel) + + return nil + }, + }, + &cli.BoolFlag{ + Name: "silent", + Usage: "Silence log output", + Action: func(*cli.Context, bool) error { + log.SetLevel(log.WarnLevel) + + return nil + }, + }, }, Copyright: fmt.Sprintf("Copyright (c) 2024-%s Fuwn", fmt.Sprint(time.Now().Year())), ExitErrHandler: func(c *cli.Context, err error) { |