logging

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	App     = func() *zap.SugaredLogger { return SubsystemSugar("app") }
	Agent   = func() *zap.SugaredLogger { return SubsystemSugar("agent") }
	Gateway = func() *zap.SugaredLogger { return SubsystemSugar("gateway") }
	Channel = func() *zap.SugaredLogger { return SubsystemSugar("channel") }
	Tool    = func() *zap.SugaredLogger { return SubsystemSugar("tool") }
	Session = func() *zap.SugaredLogger { return SubsystemSugar("session") }
	Config  = func() *zap.SugaredLogger { return SubsystemSugar("config") }
)

Common subsystem loggers

Functions

func Init

func Init(cfg LogConfig) error

Init initializes the logging system with the given configuration

func Logger

func Logger() *zap.Logger

Logger returns the root logger

func Subsystem

func Subsystem(name string) *zap.Logger

Subsystem creates a named subsystem logger

func SubsystemSugar

func SubsystemSugar(name string) *zap.SugaredLogger

SubsystemSugar creates a named sugared subsystem logger

func Sugar

func Sugar() *zap.SugaredLogger

Sugar returns the sugared logger

func Sync

func Sync() error

Sync flushes any buffered log entries

Types

type LogConfig

type LogConfig struct {
	Level      string
	Format     string
	OutputPath string
	Writer     io.Writer // explicit writer (overrides OutputPath when set)
}

LogConfig holds logging configuration

Jump to

Keyboard shortcuts

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