Documentation ¶
Index ¶
- func Debug(ctx context.Context, msg string, args ...Field) error
- func Error(ctx context.Context, msg string, args ...Field) error
- func Info(ctx context.Context, msg string, args ...Field) error
- func PrintValue(w io.Writer, field Field)
- func PrintValues(w io.Writer, fields []Field)
- func Warn(ctx context.Context, msg string, args ...Field) error
- type BufferedEventsFilter
- type Context
- type Event
- type EventType
- type Field
- func Bool(key string, value bool) Field
- func Bytes(key string, value []byte) Field
- func Duration(key string, value time.Duration) Field
- func Err(err error) Field
- func Int(key string, value int) Field
- func Int64(key string, value int64) Field
- func Interface(key string, value interface{}) Field
- func String(key string, value string) Field
- func Stringer(key string, value fmt.Stringer) Field
- func Time(key string, value time.Time) Field
- type FieldType
- type Output
- type OutputFilter
- type SplitterOutput
- type WriterOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintValue ¶
func PrintValues ¶
Types ¶
type BufferedEventsFilter ¶
type Context ¶
type Context struct { context.Context Fields []Field Output Output Parent *Context Name string Start time.Time End time.Time }
Context implements context.Context and adds some convinience logging methods like ctx.Info("Msg")
func OperationWithOutput ¶
type Output ¶
type Output interface {
Event(msg Event)
}
var DefaultOutput Output = &WriterOutput{ output: os.Stdout, colors: isatty.IsTerminal(os.Stdout.Fd()), printDuration: time.Millisecond * 20, }
DefaultOuput is the default Output for all logging
func NewBufferedOutput ¶
func NewBufferedOutput(parent Output, filter BufferedEventsFilter) Output
func NewOutputFilter ¶
func NewSplitterOutput ¶
type OutputFilter ¶
type OutputFilter struct {
// contains filtered or unexported fields
}
func (*OutputFilter) Event ¶
func (d *OutputFilter) Event(evt Event)
type SplitterOutput ¶
type SplitterOutput struct {
// contains filtered or unexported fields
}
func (*SplitterOutput) Event ¶
func (d *SplitterOutput) Event(evt Event)
type WriterOutput ¶
func (*WriterOutput) Event ¶
func (d *WriterOutput) Event(evt Event)
Click to show internal directories.
Click to hide internal directories.