log

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2020 License: MIT Imports: 3 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debugf

func Debugf(s string, args ...interface{})

func Errorf

func Errorf(s string, args ...interface{})

func Fatalf

func Fatalf(s string, args ...interface{})

func Infof

func Infof(s string, args ...interface{})

func Install

func Install(l Logger)

func Warnf

func Warnf(s string, args ...interface{})

Types

type Filter

type Filter struct {
	// contains filtered or unexported fields
}

func NewFilter

func NewFilter(accept func(e entry.Entry) bool, next Writer) *Filter

func (*Filter) Close

func (f *Filter) Close()

func (*Filter) Write

func (f *Filter) Write(e entry.Entry)

type Hook

type Hook struct {
	// contains filtered or unexported fields
}

func ComponentHook

func ComponentHook(comp string) *Hook

func NewHook

func NewHook(hookFnc func(e entry.Entry) entry.Entry) *Hook

func (*Hook) Debugf

func (lh *Hook) Debugf(s string, args ...interface{})

func (*Hook) Errorf

func (lh *Hook) Errorf(s string, args ...interface{})

func (*Hook) Fatalf

func (lh *Hook) Fatalf(s string, args ...interface{})

func (*Hook) Infof

func (lh *Hook) Infof(s string, args ...interface{})

func (*Hook) Warnf

func (lh *Hook) Warnf(s string, args ...interface{})

type Logger

type Logger interface {
	Log(e entry.Entry)
}

type MultiWriter

type MultiWriter struct {
	// contains filtered or unexported fields
}

func NewMultiWriter

func NewMultiWriter(targets ...Writer) *MultiWriter

func (*MultiWriter) Close

func (mw *MultiWriter) Close()

func (*MultiWriter) Write

func (mw *MultiWriter) Write(e entry.Entry)

type StdLogger

type StdLogger struct {
	// contains filtered or unexported fields
}

func NewStdLogger

func NewStdLogger(name string, w Writer) *StdLogger

func (*StdLogger) Close

func (l *StdLogger) Close()

func (*StdLogger) Log

func (l *StdLogger) Log(e entry.Entry)

type Writer

type Writer interface {
	Write(e entry.Entry)
	Close()
}

Directories

Path Synopsis
examples
multi command
rotate command
simple command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL