diff options
author | Matt Holt <mholt@users.noreply.github.com> | 2019-10-28 14:39:37 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-28 14:39:37 -0600 |
commit | b00dfd3965f400956c5bb5b388e9d54ef98052e5 (patch) | |
tree | 44517743815327f7ef63405b3a13e54f7f20c885 /cmd/commandfuncs.go | |
parent | 6c533558a3db4b30a6b7a81d19ac180fe2000ca2 (diff) |
v2: Logging! (#2831)
* logging: Initial implementation
* logging: More encoder formats, better defaults
* logging: Fix repetition bug with FilterEncoder; add more presets
* logging: DiscardWriter; delete or no-op logs that discard their output
* logging: Add http.handlers.log module; enhance Replacer methods
The Replacer interface has new methods to customize how to handle empty
or unrecognized placeholders. Closes #2815.
* logging: Overhaul HTTP logging, fix bugs, improve filtering, etc.
* logging: General cleanup, begin transitioning to using new loggers
* Fixes after merge conflict
Diffstat (limited to 'cmd/commandfuncs.go')
-rw-r--r-- | cmd/commandfuncs.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/commandfuncs.go b/cmd/commandfuncs.go index ec9d974..7c08c2e 100644 --- a/cmd/commandfuncs.go +++ b/cmd/commandfuncs.go @@ -387,7 +387,7 @@ func cmdAdaptConfig(fl Flags) (int, error) { if warn.Directive != "" { msg = fmt.Sprintf("%s: %s", warn.Directive, warn.Message) } - log.Printf("[WARNING][%s] %s:%d: %s", adaptCmdAdapterFlag, warn.File, warn.Line, msg) + fmt.Fprintf(os.Stderr, "[WARNING][%s] %s:%d: %s\n", adaptCmdAdapterFlag, warn.File, warn.Line, msg) } // print result to stdout @@ -436,7 +436,7 @@ func cmdValidateConfig(fl Flags) (int, error) { if warn.Directive != "" { msg = fmt.Sprintf("%s: %s", warn.Directive, warn.Message) } - log.Printf("[WARNING][%s] %s:%d: %s", validateCmdAdapterFlag, warn.File, warn.Line, msg) + fmt.Fprintf(os.Stderr, "[WARNING][%s] %s:%d: %s\n", validateCmdAdapterFlag, warn.File, warn.Line, msg) } input = adaptedConfig |