From b220c6a4352ce410ac37abda72aa7c6dc6d4fbe2 Mon Sep 17 00:00:00 2001 From: Ryan Hall Date: Wed, 2 Nov 2022 09:39:38 -0500 Subject: [PATCH] feat: add env var to log flag --- main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 7ab5e42..c37b239 100644 --- a/main.go +++ b/main.go @@ -39,9 +39,10 @@ func main() { Before: setLogFormatter, Flags: []cli.Flag{ &cli.StringFlag{ - Name: "log-format, l", - Usage: "select logrus formatter ['json', 'text']", - Value: "text", + Name: "log-format, l", + Usage: "select logrus formatter ['json', 'text']", + Value: "text", + EnvVars: []string{"LOG_FORMAT"}, }, &cli.StringFlag{ Name: "provider, p",