package loggerutils
import "github.com/docker/cli/components/engine/daemon/logger/loggerutils"
Index ¶
- Constants
- func ParseLogTag(info logger.Info, defaultTemplate string) (string, error)
- type RotateFileWriter
- func NewRotateFileWriter(logPath string, capacity int64, maxFiles int) (*RotateFileWriter, error)
- func (w *RotateFileWriter) Close() error
- func (w *RotateFileWriter) LogPath() string
- func (w *RotateFileWriter) MaxFiles() int
- func (w *RotateFileWriter) NotifyRotate() chan interface{}
- func (w *RotateFileWriter) NotifyRotateEvict(sub chan interface{})
- func (w *RotateFileWriter) Write(message []byte) (int, 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 RotateFileWriter ¶
type RotateFileWriter struct {
// contains filtered or unexported fields
}
RotateFileWriter is Logger implementation for default Docker logging.
func NewRotateFileWriter ¶
func NewRotateFileWriter(logPath string, capacity int64, maxFiles int) (*RotateFileWriter, error)
NewRotateFileWriter creates new RotateFileWriter
func (*RotateFileWriter) Close ¶
func (w *RotateFileWriter) Close() error
Close closes underlying file and signals all readers to stop.
func (*RotateFileWriter) LogPath ¶
func (w *RotateFileWriter) LogPath() string
LogPath returns the location the given writer logs to.
func (*RotateFileWriter) MaxFiles ¶
func (w *RotateFileWriter) MaxFiles() int
MaxFiles return maximum number of files
func (*RotateFileWriter) NotifyRotate ¶
func (w *RotateFileWriter) NotifyRotate() chan interface{}
NotifyRotate returns the new subscriber
func (*RotateFileWriter) NotifyRotateEvict ¶
func (w *RotateFileWriter) NotifyRotateEvict(sub chan interface{})
NotifyRotateEvict removes the specified subscriber from receiving any more messages.
func (*RotateFileWriter) Write ¶
func (w *RotateFileWriter) Write(message []byte) (int, error)
WriteLog write log message to File
Source Files ¶
log_tag.go rotatefilewriter.go
- Version
- v17.11.0-ce+incompatible
- Published
- Nov 20, 2017
- Platform
- js/wasm
- Imports
- 8 packages
- Last checked
- 4 hours ago –
Tools for package owners.