logger

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LoggerMaxSize    = 100
	LoggerMaxBackups = 30
	LoggerMaxAge     = 30
	LoggerCompress   = false
)

Variables

View Source
var (
	LogicLogger  *slog.Logger
	ApiLogger    *slog.Logger
	EngineLogger *slog.Logger
)

Functions

func GetLoggerLevel

func GetLoggerLevel(loggerLevel string) slog.Level

func InitLogger

func InitLogger(c LogConfig)

Types

type LogConfig

type LogConfig struct {
	LogLevel string `json:"log_level"`
	LogPath  string `json:"log_path"`
}

type LogManager

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

func NewLogManager

func NewLogManager(c LogConfig) *LogManager

func (*LogManager) AddLogger

func (lm *LogManager) AddLogger(c LogConfig, name string)

func (*LogManager) GetLogger

func (lm *LogManager) GetLogger(name string) *slog.Logger

Jump to

Keyboard shortcuts

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