logger

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger *zap.Logger

Functions

func AttachTUIHook added in v0.0.12

func AttachTUIHook(hook *TUIHook) error

AttachTUIHook attaches a hook for TUI log display

func Debug

func Debug(msg string, fields ...zap.Field)

func Debugf

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

func Debugw

func Debugw(msg string, keysAndValues ...interface{})

func DetachTUIHook added in v0.0.12

func DetachTUIHook()

DetachTUIHook removes the TUI hook and restores normal logging

func Error

func Error(msg string, fields ...zap.Field)

func Errorf

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

func Errorw

func Errorw(msg string, keysAndValues ...interface{})

func Fatal

func Fatal(msg string, fields ...zap.Field)

func Fatalf

func Fatalf(template string, args ...interface{})

func Fatalw

func Fatalw(msg string, keysAndValues ...interface{})

func Info

func Info(msg string, fields ...zap.Field)

Structured Logger functions (performance critical)

func Infof

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

SugaredLogger functions (more convenient, less performance critical)

func Infow

func Infow(msg string, keysAndValues ...interface{})

func NewLogger

func NewLogger() (*zap.Logger, error)

func PrintStartupBanner added in v0.0.12

func PrintStartupBanner(version, commit, date string)

PrintStartupBanner prints the Constellation Overwatch ASCII banner in NATS style

func Sync

func Sync() error

func Warn

func Warn(msg string, fields ...zap.Field)

func Warnf

func Warnf(template string, args ...interface{})

func Warnw

func Warnw(msg string, keysAndValues ...interface{})

Types

type LogEntry added in v0.0.12

type LogEntry struct {
	Time    time.Time
	Level   string
	Message string
	Fields  map[string]interface{}
}

LogEntry represents a log entry for the TUI

type TUIHook added in v0.0.12

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

TUIHook captures log entries for the TUI display

func GetTUIHook added in v0.0.12

func GetTUIHook() *TUIHook

GetTUIHook returns the current TUI hook if attached

func NewTUIHook added in v0.0.12

func NewTUIHook(bufferSize int) *TUIHook

NewTUIHook creates a new TUI log hook with the specified buffer size

func (*TUIHook) Channel added in v0.0.12

func (h *TUIHook) Channel() <-chan LogEntry

Channel returns the read-only channel of log entries

func (*TUIHook) Close added in v0.0.12

func (h *TUIHook) Close()

Close closes the log entry channel

func (*TUIHook) Write added in v0.0.12

func (h *TUIHook) Write(entry LogEntry)

Write sends a log entry to the TUI (non-blocking)

Jump to

Keyboard shortcuts

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