Documentation ¶
Index ¶
- Constants
- func CliLogErrorw(ctx context.Context, message string, keysAndValues ...interface{})
- func CliLogInfow(ctx context.Context, message string, keysAndValues ...interface{})
- func CliLogWarnw(ctx context.Context, message string, keysAndValues ...interface{})
- func GetLogHandler() zap.AtomicLevel
- func GetLogLevel() zapcore.Level
- func LoggerFrom(ctx context.Context) *zap.SugaredLogger
- func SetFallbackLogger(logger *zap.SugaredLogger)
- func SetLogLevel(l zapcore.Level)
- func SetLogLevelFromString(logLevel string)
- func SilenceLogger(ctx context.Context) context.Context
- func Sleep(ctx context.Context, amount time.Duration) error
- func WithErrorHandler(ctx context.Context, errorHandler ErrorHandler) context.Context
- func WithExistingLogger(ctx context.Context, logger *zap.SugaredLogger) context.Context
- func WithLogger(ctx context.Context, name string) context.Context
- func WithLoggerValues(ctx context.Context, meta ...interface{}) context.Context
- type Backoff
- type ErrorHandler
- type ErrorLogger
- type ExponentialBackoff
- type ExponentioalBackoffdeprecated
Constants ¶
View Source
const ( LogLevelEnvName = "LOG_LEVEL" LogToFileLocationEnvName = "LOG_TO_FILE_LOCATION" )
Variables ¶
This section is empty.
Functions ¶
func CliLogErrorw ¶
func CliLogInfow ¶
func CliLogWarnw ¶
func GetLogHandler ¶ added in v0.21.27
func GetLogHandler() zap.AtomicLevel
func GetLogLevel ¶
func LoggerFrom ¶
func LoggerFrom(ctx context.Context) *zap.SugaredLogger
func SetFallbackLogger ¶
func SetFallbackLogger(logger *zap.SugaredLogger)
func SetLogLevel ¶
func SetLogLevelFromString ¶ added in v0.21.27
func SetLogLevelFromString(logLevel string)
func WithErrorHandler ¶
func WithErrorHandler(ctx context.Context, errorHandler ErrorHandler) context.Context
func WithExistingLogger ¶ added in v0.13.3
Types ¶
type Backoff ¶
func NewExponentialBackoff ¶ added in v0.21.19
func NewExponentialBackoff(eb ExponentialBackoff) Backoff
func NewExponentioalBackoff
deprecated
func NewExponentioalBackoff(eb ExponentioalBackoff) Backoff
Deprecated: Deprecated due to typo; use NewExponentialBackoff instead
type ErrorHandler ¶
type ErrorHandler interface {
HandleErr(error)
}
func ErrorHandlerFrom ¶
func ErrorHandlerFrom(ctx context.Context) ErrorHandler
type ErrorLogger ¶
type ErrorLogger struct {
// contains filtered or unexported fields
}
func (*ErrorLogger) HandleErr ¶
func (h *ErrorLogger) HandleErr(err error)
type ExponentialBackoff ¶ added in v0.21.19
type ExponentioalBackoff
deprecated
type ExponentioalBackoff = ExponentialBackoff
Deprecated: Deprecated due to typo; use ExponentialBackoff instead
Click to show internal directories.
Click to hide internal directories.