Documentation ¶
Overview ¶
Package log beego日志
Package log 日志结构定义 ¶
Package log 日志初始化
Index ¶
- func BiBeego() *beegolog.BeeLogger
- func BiReport(msg string)
- func Close()
- func Debug(format string, a ...interface{})
- func Error(format string, a ...interface{})
- func Info(format string, a ...interface{})
- func Init(cc ...Option)
- func InitBI(debug bool, ProcessID string, Logdir string, settings map[string]interface{}, ...)
- func InitLog(debug bool, ProcessID string, Logdir string, settings map[string]interface{}, ...)
- func InstallOptionsWatchDog(dog func(cc *Options))
- func LogBeego() *beegolog.BeeLogger
- func NewBeegoLogger(debug bool, ProcessID string, Logdir string, settings map[string]interface{}, ...) *logs.BeeLogger
- func OptionsOptionDeclareWithDefault() interface{}
- func TDebug(span TraceSpan, format string, a ...interface{})
- func TError(span TraceSpan, format string, a ...interface{})
- func TInfo(span TraceSpan, format string, a ...interface{})
- func TWarning(span TraceSpan, format string, a ...interface{})
- func Warning(format string, a ...interface{})
- type Option
- func WithBIFileName(v func(logdir, prefix, processID, suffix string) string) Option
- func WithBiDir(v string) Option
- func WithBiSetting(v map[string]interface{}) Option
- func WithDebug(v bool) Option
- func WithLogDir(v string) Option
- func WithLogFileName(v func(logdir, prefix, processID, suffix string) string) Option
- func WithLogSetting(v map[string]interface{}) Option
- func WithProcessID(v string) Option
- type Options
- type TraceSpan
- type TraceSpanImp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitBI ¶
func InitBI(debug bool, ProcessID string, Logdir string, settings map[string]interface{}, logFilePath func(logdir, prefix, processID, suffix string) string)
InitBI 初始化BI日志
func InitLog ¶
func InitLog(debug bool, ProcessID string, Logdir string, settings map[string]interface{}, logFilePath func(logdir, prefix, processID, suffix string) string)
InitLog 初始化日志
func InstallOptionsWatchDog ¶
func InstallOptionsWatchDog(dog func(cc *Options))
func NewBeegoLogger ¶
func NewBeegoLogger(debug bool, ProcessID string, Logdir string, settings map[string]interface{}, logFilePath func(logdir, prefix, processID, suffix string) string) *logs.BeeLogger
NewBeegoLogger beego
func OptionsOptionDeclareWithDefault ¶
func OptionsOptionDeclareWithDefault() interface{}
Types ¶
type Option ¶
func WithBIFileName ¶
func WithBiSetting ¶
func WithLogDir ¶
func WithLogFileName ¶
func WithLogSetting ¶
func WithProcessID ¶
type Options ¶
type Options struct { Debug bool ProcessID string LogDir string LogFileName func(logdir, prefix, processID, suffix string) string BiDir string BIFileName func(logdir, prefix, processID, suffix string) string BiSetting map[string]interface{} LogSetting map[string]interface{} }
func NewOptions ¶
func (*Options) ApplyOption ¶
func (*Options) GetSetOption ¶
type TraceSpan ¶
type TraceSpan interface { // Trace is the root ID of the tree that contains all of the spans // related to this one. TraceId() string // Span is an ID that probabilistically uniquely identifies this // span. SpanId() string ExtractSpan() TraceSpan }
TraceSpan A SpanID refers to a single span.
type TraceSpanImp ¶
TraceSpanImp TraceSpanImp
func (*TraceSpanImp) ExtractSpan ¶
func (t *TraceSpanImp) ExtractSpan() TraceSpan
ExtractSpan ExtractSpan
func (*TraceSpanImp) SpanId ¶
func (t *TraceSpanImp) SpanId() string
SpanId SpanId Deprecated: 因为命名规范问题函数将废弃,请用SpanID代替
func (*TraceSpanImp) TraceId ¶
func (t *TraceSpanImp) TraceId() string
TraceId TraceId Deprecated: 因为命名规范问题函数将废弃,请用TraceID代替
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package logs provide a general log interface Usage: import "github.com/astaxie/beego/logs" log := NewLogger(10000) log.SetLogger("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 Copyright 2014 mqant Author.
|
Package logs provide a general log interface Usage: import "github.com/astaxie/beego/logs" log := NewLogger(10000) log.SetLogger("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 Copyright 2014 mqant Author. |
Click to show internal directories.
Click to hide internal directories.