package local
import "github.com/docker/docker/daemon/logger/local"
Package local provides a logger implementation that stores logs on disk.
Log messages are encoded as protobufs with a header and footer for each message. The header and footer are big-endian binary encoded uint32 values which indicate the size of the log message. The header and footer of each message allows you to efficiently read through a file either forwards or in backwards (such as is the case when tailing a file)
Example log message format: [22][This is a log message.][22][28][This is another log message.][28]
Index ¶
- Constants
- Variables
- func New(info logger.Info) (logger.Logger, error)
- func ValidateLogOpt(cfg map[string]string) error
- type CreateConfig
Constants ¶
const ( // Name is the name of the driver Name = "local" )
Variables ¶
LogOptKeys are the keys names used for log opts passed in to initialize the driver.
Functions ¶
func New ¶
New creates a new local logger You must provide the `LogPath` in the passed in info argument, this is the file path that logs are written to.
func ValidateLogOpt ¶
ValidateLogOpt looks for log driver specific options.
Types ¶
type CreateConfig ¶
CreateConfig is used to configure new instances of driver
Source Files ¶
config.go doc.go local.go read.go
- Version
- v24.0.3+incompatible
- Published
- Jul 3, 2023
- Platform
- js/wasm
- Imports
- 16 packages
- Last checked
- 21 seconds ago –
Tools for package owners.