logger

package
v0.0.0-...-65751db Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: AGPL-3.0 Imports: 1 Imported by: 3

Documentation

Overview

Package logger provides a simple logging wrapper.

Index

Constants

View Source
const (
	LevelDebug    = 100
	LevelInfo     = 200
	LevelNotice   = 300
	LevelWarning  = 400
	LevelError    = 500
	LevelCritical = 502
	LevelAlert    = 509
)

Log level constants

Variables

View Source
var Logger *logger.Logger

Logger is the shared logger instance.

Functions

func Debug

func Debug(level int, format string, args ...any)

Debug logs a debug message with the specified level.

func Error

func Error(format string, args ...any)

Error logs an error message.

func Fatal

func Fatal(format string, args ...any)

Fatal logs a fatal message and exits.

func Info

func Info(format string, args ...any)

Info logs an informational message.

func Init

func Init(logFile string, level int)

Init initializes the logger with the specified log file path and level.

Types

This section is empty.

Jump to

Keyboard shortcuts

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