Documentation
¶
Index ¶
Constants ¶
const ( StdoutType StreamType = 'O' StderrType StreamType = 'E' PartialLineType LineType = '+' FullLineType LineType = ' ' )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger implements the standard io.Write interface and adds lightweight metadata in the form of: <date> <stream id><stream type><append flag><message>
Where: - <date> is a RFC3339 Nano formatted date - <stream id> is a 2-digit hex encoded user provided stream identifier - <stream type> is either 'stdout' or 'stderr' - <append flag> is either ' ' (no-op) or '+' (append line to last line) - <message> is a user provided message.
This format is intended to be well suited to CI/CD logs, where timed output can help determine the duration of executed commands.
A new log line is emitted for each new-line character (\n) found within data provided to Write().
A new log line is also emitted for the last carriage return (\r) in calls to Write() that don't contain a new-line character. Such lines are often used to display progress bars, so having them "flushed" to the underlying stream can help with live log viewing.
type StreamType ¶
type StreamType byte