Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
Buffer buffers slog Write() calls into a ring buffer, up to some number of max lines.
func (*Buffer) LastLogLines ¶
LastLogLines returns the last n log lines from the buffer.
func (*Buffer) Listen ¶
Listen to any Write() events by calling the specificed callback function. Note the callbacks are called synchronously with the Write() call, so care must be taken to not block for a significant amount of time.
The listener should be closed by calling its Close() method once it's no longer needed.
Click to show internal directories.
Click to hide internal directories.