new Context
Creates a new ScopedLoggingContext.Builder to which additional logging metadata can be attached before being installed or used to wrap some existing code.
Foo result = ScopedLoggingContexts.newContext()
.withTags(Tags.of("my_tag", someValue))
.call(MyClass::doFoo);
Content copied to clipboard