Documentation
¶
Index ¶
- Variables
- func ContextWithInterruptCancel(log Logger, parent context.Context) (context.Context, error)
- type DebugMode
- type Environ
- type Lock
- type LogLevel
- type LogPrefix
- type LogWriter
- type Logger
- func (logger Logger) Criticalf(format string, args ...any)
- func (logger Logger) Debugf(format string, args ...any)
- func (logger Logger) Errorf(format string, args ...any)
- func (logger Logger) Infof(format string, args ...any)
- func (logger Logger) Logf(callDepth int, level LogLevel, format string, args ...any)
- func (logger Logger) Warningf(format string, args ...any)
- type WrappedLogger
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadEnvironment = errors.New("bad environment")
View Source
var ErrEnvironmentBadValue = errors.New("bad env value")
View Source
var ErrEnvironmentKeyMissing = errors.New("missing env var")
View Source
var ErrLocked = errors.New("mutex is locked")
View Source
var ErrUnlocked = errors.New("mutex is unlocked")
View Source
var LogLevelNames = map[LogLevel]string{ LogLevelDebug: "DEBUG", LogLevelInfo: "INFO", LogLevelWarning: "WARNING", LogLevelError: "ERROR", LogLevelCritical: "CRITICAL", }
View Source
var WireSet = wire.NewSet( ProvideEnvironFromProcessEnvironment, ProvideDebugMode, ProvideLogger, ProvideLogLevel, )
Functions ¶
Types ¶
type Environ ¶
type LogLevel ¶
type LogLevel int
LogLevel is what it says on the tin Any value other than the debug/info/warning/error/critical will raise an error during configuration
func ParseLogLevel ¶
func ProvideLogLevel ¶
type LogPrefix ¶
type LogPrefix string
LogPrefix should be injected from elsewhere See LoggingWireSetFactory
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func ProvideLogger ¶
type WrappedLogger ¶
Click to show internal directories.
Click to hide internal directories.