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: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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