Skip to content

Commit

Permalink
pass --loglevel to plugins as TFLINT_LOG (#1070)
Browse files Browse the repository at this point in the history
  • Loading branch information
bendrucker committed Feb 24, 2021
1 parent ff9f339 commit e8db311
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ func (cli *CLI) Run(args []string) int {
level := os.Getenv("TFLINT_LOG")
if opts.LogLevel != "" {
level = opts.LogLevel
// Pass log level to plugin processes
os.Setenv("TFLINT_LOG", level)
}
log.SetOutput(&logutils.LevelFilter{
Levels: []logutils.LogLevel{"TRACE", "DEBUG", "INFO", "WARN", "ERROR"},
Expand Down

0 comments on commit e8db311

Please sign in to comment.