Documentation ¶
Overview ¶
Package formatter provides debug logging
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// DefaultSize Default buffer size if any
DefaultSize = 256
)
Functions ¶
Types ¶
type FormatFunc ¶
FormatFunc is a function which formats the output
type Log ¶
type Log interface { // Read reads log entries from the logger Read(...ReadOption) ([]Record, error) // Write writes records to log Write(Record) error // Stream log records Stream() (Stream, error) }
Log is debug log interface for reading and writing logs
type Options ¶
type Options struct { // Name of the log Name string // Size is the size of ring buffer Size int // Format specifies the output format Format FormatFunc }
Options are logger options
type ReadOption ¶
type ReadOption func(*ReadOptions)
ReadOption used for reading the logs
func Since ¶
func Since(s time.Time) ReadOption
Since sets the time since which to return the log records
type ReadOptions ¶
type ReadOptions struct { // Since what time in past to return the logs Since time.Time // Count specifies number of logs to return Count int // Stream requests continuous log stream Stream bool }
ReadOptions for querying the logs
Click to show internal directories.
Click to hide internal directories.