22 lines
610 B
Go
22 lines
610 B
Go
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)
|
|
}
|
|
|
|
// 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)
|
|
} |