package jsonlog
import "github.com/docker/cli/components/engine/daemon/logger/jsonfilelog/jsonlog"
Index ¶
Types ¶
type JSONLog ¶
type JSONLog struct { // 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 Created time.Time `json:"time"` // Attrs is the list of extra attributes provided by the user Attrs map[string]string `json:"attrs,omitempty"` }
JSONLog is a log message, typically a single entry from a given log stream.
func (*JSONLog) Reset ¶
func (jl *JSONLog) Reset()
Reset all fields to their zero value.
type JSONLogs ¶
type JSONLogs struct { Log []byte `json:"log,omitempty"` Stream string `json:"stream,omitempty"` Created time.Time `json:"time"` // json-encoded bytes RawAttrs json.RawMessage `json:"attrs,omitempty"` }
JSONLogs marshals encoded JSONLog objects
func (*JSONLogs) MarshalJSONBuf ¶
MarshalJSONBuf is an optimized JSON marshaller that avoids reflection and unnecessary allocation.
Source Files ¶
jsonlog.go jsonlogbytes.go time_marshalling.go
- Version
- v17.12.0-ce+incompatible
- Published
- Dec 27, 2017
- Platform
- js/wasm
- Imports
- 5 packages
- Last checked
- 3 hours ago –
Tools for package owners.