logs

package
v0.1.4-alpha Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	LongDataFields = `query args`
	MaxDataLen     = 200
)
View Source
const LoggerKey = "logger"

Variables

This section is empty.

Functions

func CreateLogger

func CreateLogger() *zap.Logger

CreateLogger creates production logger

func CreateLoggerDebug

func CreateLoggerDebug() *zap.Logger

CreateLoggerDebug creates debug logger

func HttpLoggerMiddleware

func HttpLoggerMiddleware(logger *zap.Logger) func(next http.Handler) http.Handler

HttpLoggerMiddleware create logger middleware to http requests

Types

type DBLogger

type DBLogger struct {
	// contains filtered or unexported fields
}

func NewDBLogger

func NewDBLogger(log *zap.Logger) *DBLogger

func (*DBLogger) Log

func (dbl *DBLogger) Log(_ context.Context, level sqldblogger.Level, msg string, data map[string]interface{})

type FiberLogger

type FiberLogger struct {
	// contains filtered or unexported fields
}

func NewFiberLogger

func NewFiberLogger(logger *zap.Logger) *FiberLogger

func (*FiberLogger) Middleware

func (f *FiberLogger) Middleware() fiber.Handler

Jump to

Keyboard shortcuts

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