Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultSize = 1024 DefaultLog = NewLog() DefaultFormat = TextFormat )
Functions ¶
func JSONFormat ¶
func TextFormat ¶
Types ¶
type FormatFunc ¶
type Log ¶
type Option ¶
type Option func(*Options)
Option used by the logger
func Format ¶
func Format(f FormatFunc) Option
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.