Documentation ¶
Index ¶
- func Log(msg string, keyvals ...interface{})
- type Logger
- type SugaredZapLogger
- func (logger SugaredZapLogger) Error(args ...any)
- func (logger SugaredZapLogger) Errorf(format string, args ...any)
- func (logger SugaredZapLogger) Errorln(args ...any)
- func (logger SugaredZapLogger) Fatal(args ...any)
- func (logger SugaredZapLogger) Fatalf(format string, args ...any)
- func (logger SugaredZapLogger) Fatalln(args ...any)
- func (logger SugaredZapLogger) Info(args ...any)
- func (logger SugaredZapLogger) Infof(format string, args ...any)
- func (logger SugaredZapLogger) Infoln(args ...any)
- func (logger SugaredZapLogger) Log(ctx context.Context, msg string, keyvals ...interface{})
- func (logger SugaredZapLogger) Sync() error
- func (logger SugaredZapLogger) V(l int) bool
- func (logger SugaredZapLogger) Warning(args ...any)
- func (logger SugaredZapLogger) Warningf(format string, args ...any)
- func (logger SugaredZapLogger) Warningln(args ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SugaredZapLogger ¶
type SugaredZapLogger struct {
// contains filtered or unexported fields
}
SugaredZapLogger is a wrapper for otelzap.SugaredLogger and implements Logger and grpclog.LoggerV2 interfaces.
func NewLogger ¶
func NewLogger() (SugaredZapLogger, error)
NewLogger returns a new logger safe for concurrent use.
func (SugaredZapLogger) Error ¶
func (logger SugaredZapLogger) Error(args ...any)
Error logs to ERROR log. Arguments are handled in the manner of fmt.Print.
func (SugaredZapLogger) Errorf ¶
func (logger SugaredZapLogger) Errorf(format string, args ...any)
Errorf logs to ERROR log. Arguments are handled in the manner of fmt.Printf.
func (SugaredZapLogger) Errorln ¶
func (logger SugaredZapLogger) Errorln(args ...any)
Errorln logs to ERROR log. Arguments are handled in the manner of fmt.Println.
func (SugaredZapLogger) Fatal ¶
func (logger SugaredZapLogger) Fatal(args ...any)
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.
func (SugaredZapLogger) Fatalf ¶
func (logger SugaredZapLogger) Fatalf(format string, args ...any)
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.
func (SugaredZapLogger) Fatalln ¶
func (logger SugaredZapLogger) Fatalln(args ...any)
Fatalln logs to ERROR log. Arguments are handled in the manner of fmt.Println. gRPC ensures that all Fatal logs will exit with os.Exit(1). Implementations may also call os.Exit() with a non-zero exit code.
func (SugaredZapLogger) Info ¶
func (logger SugaredZapLogger) Info(args ...any)
Info logs to INFO log. Arguments are handled in the manner of fmt.Print.
func (SugaredZapLogger) Infof ¶
func (logger SugaredZapLogger) Infof(format string, args ...any)
Infof logs to INFO log. Arguments are handled in the manner of fmt.Printf.
func (SugaredZapLogger) Infoln ¶
func (logger SugaredZapLogger) Infoln(args ...any)
Infoln logs to INFO log. Arguments are handled in the manner of fmt.Println.
func (SugaredZapLogger) Log ¶
func (logger SugaredZapLogger) Log(ctx context.Context, msg string, keyvals ...interface{})
func (SugaredZapLogger) Sync ¶
func (logger SugaredZapLogger) Sync() error
func (SugaredZapLogger) V ¶
func (logger SugaredZapLogger) V(l int) bool
V reports whether verbosity level l is at least the requested verbose level.
func (SugaredZapLogger) Warning ¶
func (logger SugaredZapLogger) Warning(args ...any)
Warning logs to WARNING log. Arguments are handled in the manner of fmt.Print.
func (SugaredZapLogger) Warningf ¶
func (logger SugaredZapLogger) Warningf(format string, args ...any)
Warningf logs to WARNING log. Arguments are handled in the manner of fmt.Printf.
func (SugaredZapLogger) Warningln ¶
func (logger SugaredZapLogger) Warningln(args ...any)
Warningln logs to WARNING log. Arguments are handled in the manner of fmt.Println.