mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/logger: do not clutter -loggerFormat=json
output with stack trace
This should improve json parsing
This commit is contained in:
parent
bd4698bb7a
commit
7f3e3a6034
1 changed files with 4 additions and 0 deletions
|
@ -155,6 +155,10 @@ func logMessage(level, msg string, skipframes int) {
|
|||
|
||||
switch level {
|
||||
case "PANIC":
|
||||
if *loggerFormat == "json" {
|
||||
// Do not clutter `json` output with panic stack trace
|
||||
os.Exit(-1)
|
||||
}
|
||||
panic(errors.New(msg))
|
||||
case "FATAL":
|
||||
os.Exit(-1)
|
||||
|
|
Loading…
Reference in a new issue