logger

package
v0.0.0-...-4bfe12e Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelTrace  = slog.Level(-8)
	LevelDebug  = slog.LevelDebug
	LevelInfo   = slog.LevelInfo
	LevelNotice = slog.Level(2)
	LevelWarn   = slog.LevelWarn
	LevelError  = slog.LevelError
	LevelSilent = slog.Level(12)
)

Variables

This section is empty.

Functions

func InitLogger

func InitLogger(cfg *config.Config)

func LogBuildInfo

func LogBuildInfo(msg string)

func MiddlewareLogValues

func MiddlewareLogValues(c echo.Context, v middleware.RequestLoggerValues) error

This requires the following values to be set in middleware.RequestLoggerWithConfig:

LogError: true, LogMethod: true, LogStatus: true, LogURI: true,

func NewGormLog

func NewGormLog(sl *slog.Logger, ignoreRecordNotFound bool) logger.Interface

NewGormLog use slog to inject the gorm logs on it sl is the slog to use to send the messages. ignoreRecordNotFound when it is true, no trace is logged when a record is not found. Return a logger.Interface initialized

Types

type AppHandler

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

type Clonable

type Clonable interface {
	Clone() interface{}
}

Jump to

Keyboard shortcuts

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