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 ¶
func ExchangeLevel ¶ added in v1.0.0
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{}) }
Directories
¶
Path | Synopsis |
---|---|
Package logs provide a general log interface Usage: import "github.com/astaxie/beego/logs" log := NewLogger(10000) log.AddAdapter("console", "") > the first params stand for how many channel Use it like this: log.Trace("trace") log.Info("info") log.Warn("warning") log.Debug("debug") log.Critical("critical") more docs http://beego.me/docs/module/logs.md
|
Package logs provide a general log interface Usage: import "github.com/astaxie/beego/logs" log := NewLogger(10000) log.AddAdapter("console", "") > the first params stand for how many channel Use it like this: log.Trace("trace") log.Info("info") log.Warn("warning") log.Debug("debug") log.Critical("critical") more docs http://beego.me/docs/module/logs.md |
Click to show internal directories.
Click to hide internal directories.