logger

package
v1.0.14 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Audit

func Audit(user string, args ...interface{})

Audit records an operator action with an explicit actor. Configuration changes are also persisted in the changes table; this is intended for actions such as restarts and imports that do not create a change row.

func Debug

func Debug(args ...interface{})

func Debugf

func Debugf(format string, args ...interface{})

func Error

func Error(args ...interface{})

func Errorf

func Errorf(format string, args ...interface{})

func GetLogger

func GetLogger() *logging.Logger

func GetLogs

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

func Info

func Info(args ...interface{})

func Infof

func Infof(format string, args ...interface{})

func InitLogger

func InitLogger(level logging.Level)

func Warning

func Warning(args ...interface{})

func Warningf

func Warningf(format string, args ...interface{})

Types

type LogEntry

type LogEntry struct {
	Timestamp int64  `json:"timestamp"`
	Time      string `json:"time"`
	Level     string `json:"level"`
	Message   string `json:"message"`
	User      string `json:"user,omitempty"`
	Source    string `json:"source"`
}

LogEntry is the structured representation used by the mobile API. The original string API remains available for backwards compatibility.

func QueryLogs

func QueryLogs(query LogQuery) ([]LogEntry, int)

QueryLogs filters the in-memory log ring without exposing its storage format. Results are newest-first and pagination is applied after filtering.

type LogQuery

type LogQuery struct {
	Level  string
	User   string
	Search string
	Start  int64
	End    int64
	Offset int
	Limit  int
}

Jump to

Keyboard shortcuts

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