Documentation ¶
Overview ¶
Package logging provides a shared logger and log utilities to be used in all internal packages.
Index ¶
- Variables
- func Logger(c *gin.Context) *zap.SugaredLogger
- func NewLogger(level zapcore.LevelEnabler) (*zap.Logger, error)
- func SetLevel(level string) error
- func StandardErrorLog() *log.Logger
- func UserAwareLoggerMiddleware() gin.HandlerFunc
- func ZapLogFormatter(_ io.Writer, params handlers.LogFormatterParams)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Level = zap.NewAtomicLevel() L, _ = NewLogger(Level) S *zap.SugaredLogger = L.Sugar() )
Functions ¶
func Logger ¶ added in v0.4.12
func Logger(c *gin.Context) *zap.SugaredLogger
Logger gets the request-specific logger from the context
func StandardErrorLog ¶ added in v0.4.6
func UserAwareLoggerMiddleware ¶ added in v0.4.12
func UserAwareLoggerMiddleware() gin.HandlerFunc
UserAwareLoggerMiddleware saves a request-specific logger to the context
func ZapLogFormatter ¶ added in v0.4.0
func ZapLogFormatter(_ io.Writer, params handlers.LogFormatterParams)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.