Skip to content

Commit

Permalink
fix(logging): Fix deplicated prefix+attrMsg in log message when redir…
Browse files Browse the repository at this point in the history
…ectLogger is used (influxdata#16274)
  • Loading branch information
zmyzheng authored and justinwwhuang committed Dec 19, 2024
1 parent 8f99423 commit 1dea166
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion logger/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (l *redirectLogger) Print(level telegraf.LogLevel, ts time.Time, prefix str
attrMsg = "(" + strings.Join(parts, ",") + ")"
}

msg := []interface{}{ts.In(time.UTC).Format(time.RFC3339), level.Indicator(), prefix + attrMsg}
msg := []interface{}{ts.In(time.UTC).Format(time.RFC3339), level.Indicator()}
if prefix+attrMsg != "" {
msg = append(msg, prefix+attrMsg)
}
Expand Down

0 comments on commit 1dea166

Please sign in to comment.