logs

package module
v0.0.0-...-1c1ac12 Latest Latest
Warning

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

Go to latest
Published: May 31, 2019 License: Apache-2.0 Imports: 8 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHook

func AddHook(hook log.Hook)

func InitLog

func InitLog(fileName string, level L, reservedDays int)

func InitLogAdapter

func InitLogAdapter(fileName string, reservedDays int) log.Hook

func Log

func Log(kvs ...map[string]interface{}) *log.Entry

func SetFormatter

func SetFormatter(formatter log.Formatter)

func WithField

func WithField(key string, val interface{}) *log.Entry

Types

type F

type F log.Fields

type L

type L log.Level

type LogAdapter

type LogAdapter struct {
	// contains filtered or unexported fields
}
var LogAdapterInstance *LogAdapter

func (*LogAdapter) Close

func (la *LogAdapter) Close()

func (*LogAdapter) Fire

func (la *LogAdapter) Fire(entry *log.Entry) error

func (*LogAdapter) GetWriter

func (l *LogAdapter) GetWriter() io.Writer

func (*LogAdapter) Levels

func (*LogAdapter) Levels() []log.Level

Jump to

Keyboard shortcuts

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