docker: github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog Index | Files

package jsonlog

import "github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog"

Index

Package Files

jsonlog.go jsonlogbytes.go time_marshalling.go

type JSONLog Uses

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 Uses

func (jl *JSONLog) Reset()

Reset all fields to their zero value.

type JSONLogs Uses

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 Uses

func (mj *JSONLogs) MarshalJSONBuf(buf *bytes.Buffer) error

MarshalJSONBuf is an optimized JSON marshaller that avoids reflection and unnecessary allocation.

Package jsonlog imports 5 packages (graph) and is imported by 31 packages. Updated 2020-06-14. Refresh now. Tools for package owners.