aboutsummaryrefslogtreecommitdiff
path: root/yae.go
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-10-12 13:54:41 +0000
committerFuwn <[email protected]>2024-10-12 13:54:41 +0000
commit1f843124690c09305062bd7e36b233efe7975a78 (patch)
tree98fdc30610cde1fc83bd42698f92d7fb405d3a9e /yae.go
parentfeat(yae): hide internal tool logs (diff)
downloadyae-1f843124690c09305062bd7e36b233efe7975a78.tar.xz
yae-1f843124690c09305062bd7e36b233efe7975a78.zip
feat(yae): extra log level flags
Diffstat (limited to 'yae.go')
-rw-r--r--yae.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/yae.go b/yae.go
index 865e193..9d05dd0 100644
--- a/yae.go
+++ b/yae.go
@@ -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) {