package loggerutils
import "github.com/docker/cli/components/engine/daemon/logger/loggerutils"
Index ¶
- Constants
- func ParseLogTag(info logger.Info, defaultTemplate string) (string, error)
- type LogFile
- func NewLogFile(logPath string, capacity int64, maxFiles int, marshaller logger.MarshalFunc, decodeFunc makeDecoderFunc) (*LogFile, error)
- func (w *LogFile) Close() error
- func (w *LogFile) LogPath() string
- func (w *LogFile) MaxFiles() int
- func (w *LogFile) ReadLogs(config logger.ReadConfig, watcher *logger.LogWatcher)
- func (w *LogFile) WriteLogEntry(msg *logger.Message) error
Constants ¶
const DefaultTemplate = "{{.ID}}"
DefaultTemplate defines the defaults template logger should use.
Functions ¶
func ParseLogTag ¶
ParseLogTag generates a context aware tag for consistency across different log drivers based on the context of the running container.
Types ¶
type LogFile ¶
type LogFile struct {
// contains filtered or unexported fields
}
LogFile is Logger implementation for default Docker logging.
func NewLogFile ¶
func NewLogFile(logPath string, capacity int64, maxFiles int, marshaller logger.MarshalFunc, decodeFunc makeDecoderFunc) (*LogFile, error)
NewLogFile creates new LogFile
func (*LogFile) Close ¶
Close closes underlying file and signals all readers to stop.
func (*LogFile) LogPath ¶
LogPath returns the location the given writer logs to.
func (*LogFile) MaxFiles ¶
MaxFiles return maximum number of files
func (*LogFile) ReadLogs ¶
func (w *LogFile) ReadLogs(config logger.ReadConfig, watcher *logger.LogWatcher)
ReadLogs decodes entries from log files and sends them the passed in watcher
func (*LogFile) WriteLogEntry ¶
WriteLogEntry writes the provided log message to the current log file. This may trigger a rotation event if the max file/capacity limits are hit.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
components/engine/daemon/logger/loggerutils/multireader |
- Version
- v17.12.1-ce+incompatible
- Published
- Feb 27, 2018
- Platform
- js/wasm
- Imports
- 17 packages
- Last checked
- 4 hours ago –
Tools for package owners.