logging

package
v0.5.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package logging provides a shared logger and log utilities to be used in all internal packages.

Index

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 NewLogger added in v0.5.0

func NewLogger(level zapcore.LevelEnabler) (*zap.Logger, error)

func SetLevel added in v0.5.0

func SetLevel(level string) error

func StandardErrorLog added in v0.4.6

func StandardErrorLog() *log.Logger

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL