containerlog

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONLog

type JSONLog struct {
	// Log contains the log message.
	Log string `json:"log"`
	// Stream is source, such as stdout or stderr.
	Stream string `json:"stream,omitempty"`
	// Created is the timestamp.
	Created time.Time `json:"time"`
	// Attrs is a map extra attributes that will be added to entries.
	Attrs map[string]string `json:"attrs,omitempty"`
}

JSONLog is the Docker log message format.

type LogStream

type LogStream string
const (
	Stdout LogStream = "stdout"
	Stderr LogStream = "stderr"
)

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(filename string, maxSize, maxBackups, maxAge int, attrs map[string]string) *Logger

func (*Logger) Write

func (l *Logger) Write(stream LogStream, line string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL