Documentation
¶
Overview ¶
Package log beego日志
Package log 日志结构定义 ¶
Package log 日志初始化
Index ¶
- Constants
- func BiBeego() *beegolog.BeeLogger
- func BiReport(msg string)
- func Close()
- func Debug(format string, a ...any)
- func Error(format string, a ...any)
- func Info(format string, a ...any)
- func Init(cc ...Option)
- func InitBI(debug bool, ProcessID string, Logdir string, settings map[string]any, ...)
- func InitLog(debug bool, ProcessID string, Logdir string, settings map[string]any, ...)
- func InstallOptionsWatchDog(dog func(cc *Options))
- func LogBeego() *beegolog.BeeLogger
- func NewBeegoLogger(debug bool, ProcessID string, Logdir string, settings map[string]any, ...) *logs.BeeLogger
- func OptionsOptionDeclareWithDefault() any
- func TDebug(span TraceSpan, format string, a ...any)
- func TError(span TraceSpan, format string, a ...any)
- func TInfo(span TraceSpan, format string, a ...any)
- func TWarning(span TraceSpan, format string, a ...any)
- func Warning(format string, a ...any)
- type Option
- func WithBIFileName(v func(logdir, prefix, processID, suffix string) string) Option
- func WithBiDir(v string) Option
- func WithBiSetting(v map[string]any) 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]any) Option
- func WithProcessID(v string) Option
- type Options
- type TraceSpan
- type TraceSpanImp
Constants ¶
View Source
const CONTEXT_TRANSKEY_TRACE = "trace"
定义需要RPC传输session的ContextKey
Variables ¶
This section is empty.
Functions ¶
func InitBI ¶
func InitBI(debug bool, ProcessID string, Logdir string, settings map[string]any, logFilePath func(logdir, prefix, processID, suffix string) string)
InitBI 初始化BI日志
func InitLog ¶
func InitLog(debug bool, ProcessID string, Logdir string, settings map[string]any, 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]any, logFilePath func(logdir, prefix, processID, suffix string) string) *logs.BeeLogger
NewBeegoLogger beego
func OptionsOptionDeclareWithDefault ¶
func OptionsOptionDeclareWithDefault() any
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]any
LogSetting map[string]any
}
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
// 生产子TraceSpan
ExtractSpan() TraceSpan
// mqrpc.Marshaler
Marshal() ([]byte, error)
Unmarshal([]byte) error
String() string
}
TraceSpan A SpanID refers to a single span.
type TraceSpanImp ¶
TraceSpanImp TraceSpanImp
func (*TraceSpanImp) ExtractSpan ¶
func (t *TraceSpanImp) ExtractSpan() TraceSpan
ExtractSpan ExtractSpan
func (*TraceSpanImp) Marshal ¶
func (t *TraceSpanImp) Marshal() ([]byte, error)
func (*TraceSpanImp) String ¶
func (t *TraceSpanImp) String() string
func (*TraceSpanImp) Unmarshal ¶
func (t *TraceSpanImp) Unmarshal(bytes []byte) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.