logger

package
v2.8.9 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package logger provides logging functionality for the 3x-ui panel with dual-backend logging (console/syslog and file) and buffered log storage for web UI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseLogger

func CloseLogger()

CloseLogger closes the log file and cleans up resources. Should be called during application shutdown.

func Debug

func Debug(args ...any)

Debug logs a debug message and adds it to the log buffer.

func Debugf

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

Debugf logs a formatted debug message and adds it to the log buffer.

func Error

func Error(args ...any)

Error logs an error message and adds it to the log buffer.

func Errorf

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

Errorf logs a formatted error message and adds it to the log buffer.

func GetLogs

func GetLogs(c int, level string) []string

GetLogs retrieves up to c log entries from the buffer that are at or below the specified level.

func Info

func Info(args ...any)

Info logs an info message and adds it to the log buffer.

func Infof

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

Infof logs a formatted info message and adds it to the log buffer.

func InitLogger

func InitLogger(level logging.Level)

InitLogger initializes dual logging backends: console/syslog and file. Console logging uses the specified level, file logging always uses DEBUG level.

func Notice

func Notice(args ...any)

Notice logs a notice message and adds it to the log buffer.

func Noticef

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

Noticef logs a formatted notice message and adds it to the log buffer.

func Warning

func Warning(args ...any)

Warning logs a warning message and adds it to the log buffer.

func Warningf

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

Warningf logs a formatted warning message and adds it to the log buffer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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