mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-23 12:31:07 +01: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
@ -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 New Issue
Block a user