logging

package
v0.0.0-...-ce3407c Latest Latest
Warning

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

Go to latest
Published: May 12, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLogger

func InitLogger(cfg LoggingConfig) (*zap.Logger, error)

func WithRequestID

func WithRequestID(logger *zap.Logger, requestID string) *zap.Logger

WithRequestID returns a logger with the request ID field attached

Types

type LoggingConfig

type LoggingConfig struct {
	Level      string
	FilePath   string
	MaxSize    int // megabytes
	MaxBackups int
	MaxAge     int // days
}

Jump to

Keyboard shortcuts

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