| Constructor and Description |
|---|
LoggingHook()
Construct a new LoggingHook.
|
LoggingHook(boolean includeEvaluationContext)
Construct a new LoggingHook.
|
| Modifier and Type | Method and Description |
|---|---|
void |
after(HookContext<Object> hookContext,
FlagEvaluationDetails<Object> details,
Map<String,Object> hints)
Runs after a flag is resolved.
|
Optional<EvaluationContext> |
before(HookContext<Object> hookContext,
Map<String,Object> hints)
Runs before flag is resolved.
|
void |
error(HookContext<Object> hookContext,
Exception error,
Map<String,Object> hints)
Run when evaluation encounters an error.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfinallyAfter, supportsFlagValueTypepublic LoggingHook()
public LoggingHook(boolean includeEvaluationContext)
includeEvaluationContext - include a serialized evaluation context in the log message (defaults to false)public Optional<EvaluationContext> before(HookContext<Object> hookContext, Map<String,Object> hints)
Hookbefore in interface Hook<Object>hookContext - Information about the particular flag evaluationhints - An immutable mapping of data for users to communicate to the hooks.EvaluationContext. If returned, it will be merged with the EvaluationContext
instances from other hooks, the client and API.public void after(HookContext<Object> hookContext, FlagEvaluationDetails<Object> details, Map<String,Object> hints)
HookCopyright © 2024. All rights reserved.