Documentation ¶
Overview ¶
Package log provides debug logging
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Default buffer size if any DefaultSize = 1024 // DefaultLog logger DefaultLog = NewLog() // Default formatter DefaultFormat = TextFormat )
Functions ¶
Types ¶
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 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
Directories ¶
Path | Synopsis |
---|---|
Package kubernetes is a logger implementing (github.com/jinlongchen/go-micro/v2/debug/log).Log
|
Package kubernetes is a logger implementing (github.com/jinlongchen/go-micro/v2/debug/log).Log |
Package memory provides an in memory log buffer
|
Package memory provides an in memory log buffer |
Click to show internal directories.
Click to hide internal directories.