{"modulePath":"github.com/mudler/linuxkit","version":"v0.0.0-20220127105355-e06a1bd70d8f","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package main\n\n## Types\n\n```go\ntype LogFile struct {\n\tFile         *os.File // active file handle\n\tPath         string   // Path to the logfile\n\tBytesWritten int      // total number of bytes written so far\n}\n```\nLogFile is where we write LogMessages to\n\n```go\nfunc NewLogFile(dir, name string) (*LogFile, error)\n```\nNewLogFile creates a new LogFile.\n\n```go\nfunc (l *LogFile) Close() error\n```\nClose a log file\n\n```go\nfunc (l *LogFile) Rotate(maxLogFiles int) error\n```\nRotate closes the current log file, rotates the files and creates an empty log file.\n\n```go\nfunc (l *LogFile) Write(m *LogMessage) error\n```\nWrite appends a message to the log file\n\n```go\ntype LogMessage struct {\n\tTime    time.Time // time message was received by memlogd\n\tName    string    // name of the service that wrote the message\n\tMessage string    // body of the message\n}\n```\nLogMessage is a message received from memlogd.\n\n```go\nfunc ParseLogMessage(line string) (*LogMessage, error)\n```\nParseLogMessage reconstructs a LogMessage from a line of text which looks like: \\\u003ctimestamp\u003e,\\\u003corigin\u003e;\\\u003cbody\u003e\n\n```go\nfunc (m *LogMessage) String() string\n```\n\n","path":"github.com/mudler/linuxkit/pkg/logwrite","name":"main","synopsis":"","isRedistributable":true}
