A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pkg.go.dev/github.com/moby/moby/v2/daemon/logger@v2.0.0-20250814210528-a34c4d9bb99f below:

logger package - github.com/moby/moby/v2/daemon/logger - Go Packages

Package logger defines interfaces that logger drivers implement to log messages.

The other half of a logger driver is the implementation of the factory, which holds the contextual instance information that allows multiple loggers of the same type to perform different actions, such as logging to different locations.

This section is empty.

This section is empty.

AddBuiltinLogOpts updates the list of built-in log opts. This allows other packages to supplement additional log options without having to register an actual log driver. This is used by things that are more proxy log drivers and should not be exposed as a usable log driver to the API. This should only be called on package initialization.

ListDrivers gets the list of registered log driver names

PutMessage puts the specified message back n the message pool. The message fields are reset before putting into the pool.

RegisterExternalValidator adds the validator to the list of external validators. External validators are used by packages outside this package that need to add their own validation logic. This should only be called on package initialization.

RegisterLogDriver registers the given logging driver builder with given logging driver name.

RegisterLogOptValidator registers the logging option validator with the given logging driver name.

RegisterPluginGetter sets the plugingetter

ValidateLogOpts checks the options for the given log driver. The options supported are specific to the LogDriver implementation.

type Capability struct {
	
	ReadLogs bool
}

Capability defines the list of capabilities that a driver can implement These capabilities are not required to be a logging driver, however do determine how a logging driver can be used

Copier can copy logs from specified sources to Logger and attach Timestamp. Writes are concurrent, so you need implement some sync in your logger.

NewCopier creates a new Copier

Wait waits until all copying is done

Creator builds a logging driver instance with given context.

GetLogDriver provides the logging driver builder for a logging driver name.

type ErrReadLogsNotSupported struct{}

ErrReadLogsNotSupported is returned when the underlying log driver does not support reading

NotImplemented makes this error implement the `NotImplemented` interface from api/errdefs

Info provides enough information for a logging driver to do its function.

func (*Info) Command ΒΆ

Command returns the command that the container being logged was started with. The Entrypoint is prepended to the container arguments.

ExtraAttributes returns the user-defined extra attributes (labels, environment variables) in key-value format. This can be used by log drivers that support metadata to add more context to a log.

FullID is an alias of ContainerID.

Hostname returns the hostname from the underlying OS.

ID Returns the Container ID shortened to 12 characters.

ImageFullID is an alias of ContainerImageID.

ImageID returns the ContainerImageID shortened to 12 characters.

ImageName is an alias of ContainerImageName

Name returns the ContainerName without a preceding '/'.

LogOptValidator checks the options specific to the underlying logging implementation.

LogReader is the interface for reading log messages for loggers that support reading.

LogWatcher is used when consuming logs read from the LogReader interface.

NewLogWatcher returns a new LogWatcher.

ConsumerGone notifies that the logs consumer is gone.

func (w *LogWatcher) WatchConsumerGone() <-chan struct{}

WatchConsumerGone returns a channel receiver that receives notification when the log watcher consumer is gone.

Logger is the interface for docker logging drivers.

NewRingLogger creates a new Logger that is implemented as a RingBuffer wrapping the passed in logger.

Message is data structure that represents piece of output produced by some container. The Line member is a slice of an array whose contents can be changed after a log driver's Log() method returns.

Message is subtyped from backend.LogMessage because there is a lot of internal complexity around the Message type that should not be exposed to any package not explicitly importing the logger type.

NewMessage returns a new message from the message sync.Pool

AsLogMessage returns a pointer to the message as a pointer to backend.LogMessage, which is an identical type with a different purpose

ReadConfig is the configuration passed into ReadLogs.

type SizedLogger interface {
	Logger
	BufSize() int
}

SizedLogger is the interface for logging drivers that can control the size of buffer used for their messages.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4