Skip to content

Commit b76d839

Browse files
committed
feat: change default log level for unmatched to INFO instead of WARN
Signed-off-by: Brian McGee <[email protected]>
1 parent 5f27ef6 commit b76d839

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

cmd/root_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ func TestOnUnmatched(t *testing.T) {
7272
}
7373
}
7474

75-
// default is WARN
75+
// default is INFO
7676
t.Run("default", func(t *testing.T) {
77-
treefmt(t, withNoError(t), withStderr(checkOutput(log.WarnLevel)))
77+
treefmt(t, withArgs("-v"), withNoError(t), withStderr(checkOutput(log.InfoLevel)))
7878
})
7979

8080
// should exit with error when using fatal

config/config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func SetFlags(fs *pflag.FlagSet) {
8989
"Ignore the evaluation cache entirely. Useful for CI. (env $TREEFMT_NO_CACHE)",
9090
)
9191
fs.StringP(
92-
"on-unmatched", "u", "warn",
92+
"on-unmatched", "u", "info",
9393
"Log paths that did not match any formatters at the specified log level. Possible values are "+
9494
"<debug|info|warn|error|fatal>. (env $TREEFMT_ON_UNMATCHED)",
9595
)

config/config_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ func TestOnUnmatched(t *testing.T) {
336336
}
337337

338338
// default with no flag, env or config
339-
checkValue("warn")
339+
checkValue("info")
340340

341341
// set config value
342342
cfg.OnUnmatched = "error"

0 commit comments

Comments
 (0)