logging

package
v2026.1015.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const CYAN = "\033[96m"
View Source
const DEBUG_LOG_LEVEL = 3
View Source
const END = "\033[0m"
View Source
const ERROR_LOG_LEVEL = 0
View Source
const GRAY = "\033[90m"
View Source
const GREEN = "\033[92m"
View Source
const INFO_LOG_LEVEL = 2
View Source
const MAGENTA = "\033[95m"
View Source
const RED = "\033[91m"
View Source
const RESULT_LOG_LEVEL = 4
View Source
const WARNING_LOG_LEVEL = 1
View Source
const YELLOW = "\033[93m"

Variables

View Source
var GLOBAL_LOG_LEVEL = -1

Functions

func ClearNotificationMemoryForTest added in v2026.1011.0

func ClearNotificationMemoryForTest()

func Configure

func Configure(config Config) error

func IsolateNotificationsForTest added in v2026.1011.0

func IsolateNotificationsForTest(dir string) func()

func LevelLabel

func LevelLabel(level int) string

func Log

func Log(currentLogLevel int, message string, options ...LogOptions)

func LogInit

func LogInit(globalLogLevel ...int)

func ParseLevel

func ParseLevel(s string) (int, error)

func ReadLast

func ReadLast(n int) ([]string, error)

func RecordNotification added in v2026.1011.0

func RecordNotification(level, message string)

RecordNotification keeps system output and GUI errors independently of chat transcripts.

func RecordNotificationAtForTest added in v2026.1011.0

func RecordNotificationAtForTest(date, level, message string)

func SetGlobalLevel

func SetGlobalLevel(level int) error

Types

type Config

type Config struct {
	Dir          string
	WriteConsole bool
	WriteFile    bool
	Retention    int
}

type LogOptions

type LogOptions struct {
	Params       map[string]any
	Override     bool
	WriteConsole *bool
	WriteFile    *bool
}

type Notification added in v2026.1011.0

type Notification struct {
	ID        string `json:"id"`
	CreatedAt string `json:"createdAt"`
	Level     string `json:"level"`
	Message   string `json:"message"`
}

func ReadNotifications added in v2026.1011.0

func ReadNotifications() ([]Notification, error)

ReadNotifications includes every available historical log, not just today's file.

Jump to

Keyboard shortcuts

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