Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1047,8 +1047,11 @@ func (c *Client) logStderr(r io.Reader) {
}
} else {
out := flattenKVPairs(entry.KVPairs)

out = append(out, "timestamp", entry.Timestamp.Format(hclog.TimeFormat))
if !entry.Timestamp.IsZero() {
// no point in including a zero timestamp
// this can happen if the upstream logger has DisableTime set to true
out = append(out, "timestamp", entry.Timestamp.Format(hclog.TimeFormat))
}
switch hclog.LevelFromString(entry.Level) {
case hclog.Trace:
l.Trace(entry.Message, out...)
Expand Down