Files
loggerx/interfaces.go
T

22 lines
610 B
Go
Raw Normal View History

2024-11-15 17:59:35 +08:00
package loggerx
import "context"
// 简单使用的日志接口
type LoggerInterface interface {
Info(ctx context.Context, args ...any)
Infof(ctx context.Context, format string, args ...any)
Error(ctx context.Context, args ...any)
Errorf(ctx context.Context, format string, args ...any)
}
2025-08-23 19:17:40 +08:00
// Debug 使用的日志接口
// Waring 警告的日志接口
type DebugLoggerInterface interface {
LoggerInterface
Debug(ctx context.Context, args ...any)
Debugf(ctx context.Context, format string, args ...any)
Warn(ctx context.Context, args ...any)
Warnf(ctx context.Context, format string, args ...any)
}