Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogAttribute ¶
type LogAttribute struct {
FilePrefixName string
}
func (*LogAttribute) Close ¶
func (l *LogAttribute) Close()
func (*LogAttribute) Err ¶
func (l *LogAttribute) Err(a ...any)
func (*LogAttribute) Info ¶
func (l *LogAttribute) Info(a ...any)
func (*LogAttribute) Warn ¶
func (l *LogAttribute) Warn(a ...any)
type LogContrl ¶
type LogContrl interface {
Init() bool // Init 初始化日志
Info(a ...any) // Init 正常日志
Err(a ...any) // Init 错误日志
Warn(a ...any) // Init 警告日志
Close() // Init 关闭日志 一般用延迟关闭 defer logs.Close()
}
LogContrl @Example
var logs logksam.LogContrl = &logksam.LogAttribute{FilePrefixName: "log"}
logs.Init() 初始化
defer logs.Close() 关闭
logs.Info("我爱你", "\t", "你知道吗") 正常信息
logs.Err("我爱你", "\t", "你知道吗") 错误信息
logs.Warn("我爱你", "\t", "你知道吗") 警告信息
Click to show internal directories.
Click to hide internal directories.