logger

package
v0.0.0-...-9d183bc Latest Latest
Warning

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

Go to latest
Published: May 28, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INFO  = "INFO"
	ERROR = "ERROR"
	DEBUG = "DEBUG"
	WARN  = "WARN"

	ERROR_MESSAGE = "err_msg"
)

Variables

This section is empty.

Functions

func Log

func Log(level, message string, fields ...Field)

Log writes a log message at the specified level with optional fields. If level is empty, it defaults to "info". Logs are written to both a file and stdout.

Types

type Field

type Field struct {
	Key   string
	Value interface{}
}

Field represents a key-value pair for structured logging.

Jump to

Keyboard shortcuts

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