logger

package
v0.0.0-...-071fe3b Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

NemesisBot - AI agent License: MIT Copyright (c) 2026 NemesisBot contributors

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(message string)

func DebugC

func DebugC(component string, message string)

func DebugCF

func DebugCF(component string, message string, fields map[string]interface{})

func DebugF

func DebugF(message string, fields map[string]interface{})

func DisableConsole

func DisableConsole()

DisableConsole disables console output

func DisableFileLogging

func DisableFileLogging()

func DisableLogging

func DisableLogging()

DisableLogging disables all logging

func EnableConsole

func EnableConsole()

EnableConsole enables console output

func EnableFileLogging

func EnableFileLogging(filePath string) error

func EnableLogging

func EnableLogging()

EnableLogging enables all logging (file + console)

func Error

func Error(message string)

func ErrorC

func ErrorC(component string, message string)

func ErrorCF

func ErrorCF(component string, message string, fields map[string]interface{})

func ErrorF

func ErrorF(message string, fields map[string]interface{})

func Fatal

func Fatal(message string)

func FatalC

func FatalC(component string, message string)

func FatalCF

func FatalCF(component string, message string, fields map[string]interface{})

func FatalF

func FatalF(message string, fields map[string]interface{})

func Info

func Info(message string)

func InfoC

func InfoC(component string, message string)

func InfoCF

func InfoCF(component string, message string, fields map[string]interface{})

func InfoF

func InfoF(message string, fields map[string]interface{})

func IsConsoleEnabled

func IsConsoleEnabled() bool

IsConsoleEnabled returns whether console output is enabled

func IsLoggingEnabled

func IsLoggingEnabled() bool

IsLoggingEnabled returns whether logging is enabled

func SetLevel

func SetLevel(level LogLevel)

func SetLogHook

func SetLogHook(hook LogHook)

SetLogHook sets an optional callback that is invoked (asynchronously) for each log entry.

func Warn

func Warn(message string)

func WarnC

func WarnC(component string, message string)

func WarnCF

func WarnCF(component string, message string, fields map[string]interface{})

func WarnF

func WarnF(message string, fields map[string]interface{})

Types

type LogEntry

type LogEntry struct {
	Level     string                 `json:"level"`
	Timestamp string                 `json:"timestamp"`
	Component string                 `json:"component,omitempty"`
	Message   string                 `json:"message"`
	Fields    map[string]interface{} `json:"fields,omitempty"`
	Caller    string                 `json:"caller,omitempty"`
}

type LogHook

type LogHook func(entry LogEntry)

LogHook is a callback function invoked for each log entry. Used to bridge logger output to SSE EventHub for Dashboard real-time updates.

type LogLevel

type LogLevel int
const (
	DEBUG LogLevel = iota
	INFO
	WARN
	ERROR
	FATAL
)

func GetLevel

func GetLevel() LogLevel

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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