github.com/LazyboyChen7/engine@v17.12.1-ce-rc2+incompatible/daemon/logger/jsonfilelog/jsonlog/jsonlog.go (about) 1 package jsonlog 2 3 import ( 4 "time" 5 ) 6 7 // JSONLog is a log message, typically a single entry from a given log stream. 8 type JSONLog struct { 9 // Log is the log message 10 Log string `json:"log,omitempty"` 11 // Stream is the log source 12 Stream string `json:"stream,omitempty"` 13 // Created is the created timestamp of log 14 Created time.Time `json:"time"` 15 // Attrs is the list of extra attributes provided by the user 16 Attrs map[string]string `json:"attrs,omitempty"` 17 } 18 19 // Reset all fields to their zero value. 20 func (jl *JSONLog) Reset() { 21 jl.Log = "" 22 jl.Stream = "" 23 jl.Created = time.Time{} 24 jl.Attrs = make(map[string]string) 25 }