Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Module("logfx", fx.Provide( NewLogger, fx.Annotate( NewLevelReloader, fx.As(new(reloadfx.Reloadable)), fx.ResultTags(`group:"reloaders"`), ), ), fx.Invoke(BridgeStdLog), )
Module defines the logfx module for UberFX.
Functions ¶
func BridgeStdLog ¶
BridgeStdLog wires the standard library log package to the provided slog logger.
This is executed in an fx lifecycle hook to ensure the logger is available.
Types ¶
type FxEventLogger ¶
type FxEventLogger struct {
// contains filtered or unexported fields
}
FxEventLogger adapts fx internal events to the existing slog-based logging.
func (*FxEventLogger) LogEvent ¶
func (l *FxEventLogger) LogEvent(event fxevent.Event)
type LevelReloader ¶
type LevelReloader struct{}
LevelReloader handles atomic updates of the level package configuration.
func NewLevelReloader ¶
func NewLevelReloader() *LevelReloader
NewLevelReloader creates a new LevelReloader instance.
func (*LevelReloader) ApplyConfig ¶
ApplyConfig syncs the new configuration to the level package.
func (*LevelReloader) Name ¶
func (l *LevelReloader) Name() string
Name returns the name of the reloader for the reload manager.
func (*LevelReloader) Order ¶
func (l *LevelReloader) Order() int
Order defines the execution order during a reload.
Click to show internal directories.
Click to hide internal directories.