logs

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2016 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEBUG = iota
	INFO
	WARN
	ERROR
	FATAL
	OFF
)

Log levels to control the logging output.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	SetMsgChan(channelLen int64)
	// SetLevel Set log message level.
	// If message level (such as LevelDebug) is higher than logger level (such as LevelWarning),
	// log providers will not even be sent the message.
	SetLevel(l int)
	// EnableFuncCallDepth enable log funcCallDepth
	EnableFuncCallDepth(b bool)
	// AddAdapter provides a given logger adapter into Logger with config string.
	// config need to be correct JSON as string: {"interval":360}.
	AddAdapter(adaptername string, config string) error

	Write(p []byte) (n int, err error)
	Sys(format string, v ...interface{})
	Fatal(format string, v ...interface{})
	Error(format string, v ...interface{})
	Warn(format string, v ...interface{})
	Info(format string, v ...interface{})
	Debug(format string, v ...interface{})
}

func NewLogger

func NewLogger(channelLen int64) Logger

type TgLogger

type TgLogger struct {
	*logs.BeeLogger
}

func (*TgLogger) SetLevel

func (t *TgLogger) SetLevel(l int)

Directories

Path Synopsis
Package logs provide a general log interface Usage:
Package logs provide a general log interface Usage:
es

Jump to

Keyboard shortcuts

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