5cdb9c8a |
package jsonlog
import (
"time"
)
|
a06ad279 |
// JSONLog is a log message, typically a single entry from a given log stream. |
5cdb9c8a |
type JSONLog struct { |
5220f3b5 |
// Log is the log message
Log string `json:"log,omitempty"`
// Stream is the log source
Stream string `json:"stream,omitempty"`
// Created is the created timestamp of log |
5cdb9c8a |
Created time.Time `json:"time"` |
bd9d14a0 |
// Attrs is the list of extra attributes provided by the user
Attrs map[string]string `json:"attrs,omitempty"` |
5cdb9c8a |
}
|
638d4cc7 |
// Reset all fields to their zero value. |
473bb527 |
func (jl *JSONLog) Reset() {
jl.Log = ""
jl.Stream = ""
jl.Created = time.Time{} |
638d4cc7 |
jl.Attrs = make(map[string]string) |
473bb527 |
} |