Documentation ¶
Overview ¶
Package jsonfilelog provides the default Logger implementation for Docker logging. This logger logs to files on the host server in the JSON format.
Index ¶
Constants ¶
View Source
const Name = "json-file"
Name is the name of the file that the jsonlogger logs to.
Variables ¶
This section is empty.
Functions ¶
func ValidateLogOpt ¶ added in v1.8.0
ValidateLogOpt looks for json specific log options max-file & max-size.
Types ¶
type JSONFileLogger ¶
type JSONFileLogger struct {
// contains filtered or unexported fields
}
JSONFileLogger is Logger implementation for default Docker logging.
func (*JSONFileLogger) Close ¶
func (l *JSONFileLogger) Close() error
Close closes underlying file and signals all the readers that the logs producer is gone.
func (*JSONFileLogger) Log ¶
func (l *JSONFileLogger) Log(msg *logger.Message) error
Log converts logger.Message to jsonlog.JSONLog and serializes it to file.
func (*JSONFileLogger) Name ¶
func (l *JSONFileLogger) Name() string
Name returns name of this logger.
func (*JSONFileLogger) ReadLogs ¶ added in v1.8.0
func (l *JSONFileLogger) ReadLogs(ctx context.Context, config logger.ReadConfig) *logger.LogWatcher
ReadLogs implements the logger's LogReader interface for the logs created by this driver.
Click to show internal directories.
Click to hide internal directories.