Documentation
¶
Index ¶
- func CopyLoggerToContext(src, dst context.Context) context.Context
- func HTTPLevelChangeFunc(w http.ResponseWriter, r *http.Request)
- func Init(appName string) *zap.Logger
- func InitTest(t testing.TB) *zap.Logger
- func L() *zap.Logger
- func Logger(ctx context.Context) *zap.Logger
- func ReadLoggingConfig()
- func WithDefaultLogger(ctx context.Context) context.Context
- func WithFields(ctx context.Context, fields ...zapcore.Field) context.Context
- func WithLogger(ctx context.Context, logger *zap.Logger) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyLoggerToContext ¶
CopyLoggerToContext copies the logger from one context to another.
func HTTPLevelChangeFunc ¶
func HTTPLevelChangeFunc(w http.ResponseWriter, r *http.Request)
HTTPLevelChangeFunc allows you to host an endpoint that will change the logging level on the default logger
func ReadLoggingConfig ¶
func ReadLoggingConfig()
func WithDefaultLogger ¶
WithDefaultLogger will put the specified logger in the returned context.
func WithFields ¶
WithFields adds all of the given fields to the context logger.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.