logging

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LogLevels = struct {
		INFO, DEBUG, WARN, ERROR slog.Level
	}{
		INFO:  slog.LevelInfo,
		DEBUG: slog.LevelDebug,
		WARN:  slog.LevelWarn,
		ERROR: slog.LevelError,
	}
)

Functions

func GetInstance

func GetInstance(logLevel slog.Level) *slog.Logger

GetInstance implemented as singleton pattern to get Logger instance, created once for whole app:.

func GetLogTraceback

func GetLogTraceback() string

GetLogTraceback return a string with info about filename, function name and line https://stackoverflow.com/questions/25927660/how-to-get-the-current-function-name

Types

This section is empty.

Jump to

Keyboard shortcuts

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