Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustNewKisDefaultSlog ¶ added in v1.0.3
func MustNewKisDefaultSlog(opts ...KisLogOptions)
Types ¶
type KisLogOptions ¶ added in v1.0.3
type KisLogOptions func(k *kisDefaultSlog)
func WithJSONFormat ¶ added in v1.0.3
func WithJSONFormat(jsonFormat bool) KisLogOptions
func WithLevel ¶ added in v1.0.3
func WithLevel(level slog.Level) KisLogOptions
func WithLocation ¶ added in v1.0.3
func WithLocation(location bool) KisLogOptions
func WithWriter ¶ added in v1.0.3
func WithWriter(writer io.Writer) KisLogOptions
type KisLogger ¶
type KisLogger interface {
// InfoFX 有上下文的Info级别日志接口, format字符串格式
InfoFX(ctx context.Context, str string, v ...interface{})
// ErrorFX 有上下文的Error级别日志接口, format字符串格式
ErrorFX(ctx context.Context, str string, v ...interface{})
// DebugFX 有上下文的Debug级别日志接口, format字符串格式
DebugFX(ctx context.Context, str string, v ...interface{})
// InfoF 无上下文的Info级别日志接口, format字符串格式
InfoF(str string, v ...interface{})
// ErrorF 无上下文的Error级别日志接口, format字符串格式
ErrorF(str string, v ...interface{})
// DebugF 无上下文的Debug级别日志接口, format字符串格式
DebugF(str string, v ...interface{})
// InfoX 有上下文的Info级别日志接口, format字符串格式
InfoX(ctx context.Context, str string, v ...interface{})
// ErrorX 有上下文的Error级别日志接口, format字符串格式
ErrorX(ctx context.Context, str string, v ...interface{})
// DebugX 有上下文的Debug级别日志接口, format字符串格式
DebugX(ctx context.Context, str string, v ...interface{})
// Info 无上下文的Info级别日志接口, format字符串格式
Info(str string, v ...interface{})
// Error 无上下文的Error级别日志接口, format字符串格式
Error(str string, v ...interface{})
// Debug 无上下文的Debug级别日志接口, format字符串格式
Debug(str string, v ...interface{})
// SetDebugMode 设置Debug模式
SetDebugMode()
}
Click to show internal directories.
Click to hide internal directories.