Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Marshal ¶
func Marshal(msg *logger.LogMessage, rawAttrs []byte) ([]byte, error)
Marshal used to marshal LogMessage to byte[]
func ValidateLogOpt ¶
ValidateLogOpt validate log options for json-file log driver
Types ¶
type JSONLogFile ¶
type JSONLogFile struct {
// contains filtered or unexported fields
}
JSONLogFile is uses to log the container's stdout and stderr.
func NewJSONLogFile ¶
func NewJSONLogFile(logPath string, perms os.FileMode, logConfig map[string]string, marshalFunc MarshalFunc) (*JSONLogFile, error)
NewJSONLogFile returns new JSONLogFile instance.
func (*JSONLogFile) ReadLogMessages ¶
func (lf *JSONLogFile) ReadLogMessages(cfg *logger.ReadConfig) *logger.LogWatcher
ReadLogMessages will create goroutine to read the log message and send it to LogWatcher.
func (*JSONLogFile) WriteLogMessage ¶
func (lf *JSONLogFile) WriteLogMessage(msg *logger.LogMessage) error
WriteLogMessage will write the LogMessage into the file.
type MarshalFunc ¶
type MarshalFunc func(message *logger.LogMessage) ([]byte, error)
MarshalFunc is the function of marshal the logMessage
Click to show internal directories.
Click to hide internal directories.