logger

package
v0.0.0-...-51c1a95 Latest Latest
Warning

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

Go to latest
Published: May 28, 2025 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOGDIR   = "/logs/"
	FILENAME = "logfile.txt"
)

Variables

View Source
var (
	Level zap.AtomicLevel
	Log   *zap.Logger
	Cfg   *zap.Logger
	Api   *zap.Logger
	Init  *zap.Logger
	Prod  *zap.Logger
	Ctx   *zap.Logger
	Util  *zap.Logger
	Gin   *zap.Logger
)

Functions

func Initialize

func Initialize(env string)

func LogInt

func LogInt(key string, val int) zapcore.Field

func LogString

func LogString(key, val string) zapcore.Field

func NewRouterWithLogger

func NewRouterWithLogger(log *zap.Logger) *gin.Engine

Returns a new router with Zap logger middleware

func SetLogLevel

func SetLogLevel(l string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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