Documentation ¶
Index ¶
- func Debug(args ...interface{})
- func DebugContextf(ctx context.Context, format string, args ...interface{})
- func Debugf(format string, args ...interface{})
- func DebugfWithFuncName(format string, args ...interface{})
- func Error(args ...interface{})
- func ErrorContextf(ctx context.Context, format string, args ...interface{})
- func Errorf(format string, args ...interface{})
- func ErrorfWithFuncName(format string, args ...interface{})
- func Fatal(args ...interface{})
- func FatalContextf(ctx context.Context, format string, args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Info(args ...interface{})
- func InfoContextf(ctx context.Context, format string, args ...interface{})
- func Infof(format string, args ...interface{})
- func InfofWithFuncName(format string, args ...interface{})
- func SetLogger(logger Logger)
- func Sync() error
- func Warn(args ...interface{})
- func WarnContextf(ctx context.Context, format string, args ...interface{})
- func Warnf(format string, args ...interface{})
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugContextf ¶
DebugContextf .
func DebugfWithFuncName ¶
func DebugfWithFuncName(format string, args ...interface{})
DebugfWithFuncName 将函数名封装在format前
func ErrorContextf ¶
ErrorContextf .
func ErrorfWithFuncName ¶
func ErrorfWithFuncName(format string, args ...interface{})
ErrorfWithFuncName 将函数名封装在format前
func FatalContextf ¶
FatalContextf .
func InfoContextf ¶
InfoContextf .
func InfofWithFuncName ¶
func InfofWithFuncName(format string, args ...interface{})
InfofWithFuncName 将函数名封装在format前
func WarnContextf ¶
WarnContextf .
Types ¶
type Logger ¶
type Logger interface { // Debug logs to DEBUG log. Arguments are handled in the manner of fmt.Print. Debug(args ...interface{}) // Debugf logs to DEBUG log. Arguments are handled in the manner of fmt.Print. Debugf(format string, args ...interface{}) // DebugContextf logs to DEBUG log. Arguments are handled in the manner of fmt.Printf. DebugContextf(ctx context.Context, format string, args ...interface{}) // Info logs to INFO log. Arguments are handled in the manner of fmt.Print. Info(args ...interface{}) // Infof logs to INFO log. Arguments are handled in the manner of fmt.Print. Infof(format string, args ...interface{}) // InfoContextf logs to INFO log. Arguments are handled in the manner of fmt.Printf. InfoContextf(ctx context.Context, format string, args ...interface{}) // Warn logs to WARN log. Arguments are handled in the manner of fmt.Print. Warn(args ...interface{}) // Warnf logs to WARN log. Arguments are handled in the manner of fmt.Printf. Warnf(format string, args ...interface{}) // WarnContextf logs to WARN log. Arguments are handled in the manner of fmt.Printf. WarnContextf(ctx context.Context, format string, args ...interface{}) // Error logs to ERROR log. Arguments are handled in the manner of fmt.Print. Error(args ...interface{}) // Errorf logs to ERROR log. Arguments are handled in the manner of fmt.Printf. Errorf(format string, args ...interface{}) // ErrorContextf logs to ERROR log. Arguments are handled in the manner of fmt.Printf. ErrorContextf(ctx context.Context, format string, args ...interface{}) // Fatal logs to ERROR log. Arguments are handled in the manner of fmt.Print. // gRPC ensures that all Fatal logs will exit with os.Exit(1). // Implementations may also call os.Exit() with a non-zero exit code. Fatal(args ...interface{}) // Fatalf logs to ERROR log. Arguments are handled in the manner of fmt.Printf. // gRPC ensures that all Fatal logs will exit with os.Exit(1). // Implementations may also call os.Exit() with a non-zero exit code. Fatalf(format string, args ...interface{}) // FatalContextf logs to ERROR log. Arguments are handled in the manner of fmt.Printf. // gRPC ensures that all Fatal logs will exit with os.Exit(1). // Implementations may also call os.Exit() with a non-zero exit code. FatalContextf(ctx context.Context, format string, args ...interface{}) // Sync resource close Sync() error }
Logger 日志接口
Click to show internal directories.
Click to hide internal directories.