Documentation
¶
Index ¶
- type LoggingHook
- func (h *LoggingHook) After(ctx context.Context, hookContext of.HookContext, ...) error
- func (h *LoggingHook) Before(ctx context.Context, hookContext of.HookContext, hookHints of.HookHints) (*of.EvaluationContext, error)
- func (h *LoggingHook) Error(ctx context.Context, hookContext of.HookContext, err error, ...)
- func (h *LoggingHook) Finally(ctx context.Context, hookContext of.HookContext, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoggingHook ¶
type LoggingHook struct {
// contains filtered or unexported fields
}
LoggingHook is a of.Hook that logs the flag evaluation lifecycle.
func NewLoggingHook ¶
func NewLoggingHook(includeEvaluationContext bool, logger *slog.Logger) *LoggingHook
NewLoggingHook returns a new LoggingHook with the provided logger.
func (*LoggingHook) After ¶
func (h *LoggingHook) After(ctx context.Context, hookContext of.HookContext, flagEvaluationDetails of.InterfaceEvaluationDetails, hookHints of.HookHints, ) error
func (*LoggingHook) Before ¶
func (h *LoggingHook) Before(ctx context.Context, hookContext of.HookContext, hookHints of.HookHints) (*of.EvaluationContext, error)
func (*LoggingHook) Error ¶
func (h *LoggingHook) Error(ctx context.Context, hookContext of.HookContext, err error, hookHints of.HookHints)
func (*LoggingHook) Finally ¶
func (h *LoggingHook) Finally(ctx context.Context, hookContext of.HookContext, flagEvaluationDetails of.InterfaceEvaluationDetails, hookHints of.HookHints)
Click to show internal directories.
Click to hide internal directories.