Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainMaker ¶
type ChainMaker struct {
// contains filtered or unexported fields
}
ChainMaker ...
func (*ChainMaker) Find ¶
func (inst *ChainMaker) Find(name string) (vlog.MessageFilter, error)
Find ...
func (*ChainMaker) Make ¶
func (inst *ChainMaker) Make(src []vlog.MessageFilterRegistry, filterNameList string) (vlog.MessageFilterChain, error)
Make 创建过滤器链,filterNameList 是一个以 ',' 分隔的名单字符串
type ConsoleWriter ¶
type ConsoleWriter struct {
// contains filtered or unexported fields
}
ConsoleWriter 用于向默认控制台输出日志
func (*ConsoleWriter) DoFilter ¶
func (inst *ConsoleWriter) DoFilter(msg *vlog.Message, chain vlog.MessageFilterChain)
DoFilter ...
func (*ConsoleWriter) ListLogFilterRegistration ¶
func (inst *ConsoleWriter) ListLogFilterRegistration() []*vlog.MessageFilterRegistration
ListLogFilterRegistration ...
type DefaultFormatter ¶
type DefaultFormatter struct {
Format string //starter:inject("${vlog.formatters.default.format}")
// contains filtered or unexported fields
}
DefaultFormatter 用于(以默认格式)格式化日志消息
func (*DefaultFormatter) DoFilter ¶
func (inst *DefaultFormatter) DoFilter(msg *vlog.Message, chain vlog.MessageFilterChain)
DoFilter ...
func (*DefaultFormatter) ListLogFilterRegistration ¶
func (inst *DefaultFormatter) ListLogFilterRegistration() []*vlog.MessageFilterRegistration
ListLogFilterRegistration ...
type FormatData ¶
type FormatData struct {
LEVEL string
TAG string
YEAR string
MONTH string
DAY string
HH string
MM string
SS string
SSS string
ZONE string
}
FormatData ...
type Formatter ¶
type Formatter struct {
// contains filtered or unexported fields
}
Formatter 是日志消息格式化工具
type LoggerContext ¶
type LoggerContext struct {
// contains filtered or unexported fields
}
LoggerContext ...
func (*LoggerContext) IsLevelEnabled ¶
func (inst *LoggerContext) IsLevelEnabled(l vlog.Level) bool
IsLevelEnabled ...
func (*LoggerContext) LogWithLevel ¶
func (inst *LoggerContext) LogWithLevel(level vlog.Level, format string, args ...any)
LogWithLevel ...
func (*LoggerContext) LogWithMessage ¶
func (inst *LoggerContext) LogWithMessage(msg *vlog.Message)
LogWithMessage ...
type LoggerProxy ¶ added in v1.0.1
type LoggerProxy struct {
// adapter
vlog.LoggerAdapter
// contains filtered or unexported fields
}
LoggerProxy 向 application.Context 提供一个代理的 vlog.Logger 接口, 并将日志转发给默认的日志组件
func (*LoggerProxy) Life ¶ added in v1.0.14
func (inst *LoggerProxy) Life() *application.Life
type MainGroup ¶
type MainGroup struct {
Filters []vlog.MessageFilterRegistry //starter:inject(".")
FilterNameList string //starter:inject("${vlog.groups.main.filters}")
// contains filtered or unexported fields
}
MainGroup 这是 vlog 的主要过滤器组
func (*MainGroup) DoFilter ¶
func (inst *MainGroup) DoFilter(msg *vlog.Message, chain vlog.MessageFilterChain)
DoFilter ...
func (*MainGroup) GetFilterChain ¶
func (inst *MainGroup) GetFilterChain() vlog.MessageFilterChain
GetFilterChain ...
func (*MainGroup) ListLogFilterRegistration ¶
func (inst *MainGroup) ListLogFilterRegistration() []*vlog.MessageFilterRegistration
ListLogFilterRegistration ...
type MainLogger ¶
type MainLogger struct {
Filters []vlog.MessageFilterRegistry //starter:inject(".")
Level string //starter:inject("${vlog.level}")
MainGroupName string //starter:inject("${vlog.main}")
Context application.Context //starter:inject("context")
// contains filtered or unexported fields
}
MainLogger 用于向文件输出日志
type StartupBuffer ¶
type StartupBuffer interface {
Init(atts attributes.Table)
GetStartupTime() time.Time
}
StartupBuffer 是 starter 启动初期的日志缓冲区
func NewStartupBuffer ¶
func NewStartupBuffer() StartupBuffer
NewStartupBuffer 创建 starter 启动初期的日志缓冲区
Click to show internal directories.
Click to hide internal directories.