You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<1> Stores an attribute named "name" with the fixed value "Joe" in the MDC.
181
181
<2> Stores an attribute named "otherName" with the given `Supplier<String>`.
182
182
183
-
The `set(<String, String>`) method associates the name with a fixed value. The `set(<String>, <Supplier<String>>) form associates the name with a lambda or method reference. This second form might be useful if your code (or Helidon) maintains the value you want to log in some context that your code can access and if that value changes as the server runs. In both cases, when your logging format refers to the name logging extracts the corresponding fixed value or invoked the supplier to obtain the value, using the result in log output.
183
+
The `set(<String, String>)` method associates the name with a fixed value. The `set(<String>, <Supplier<String>>)` form associates the name with a lambda or method reference. This second form might be useful if your code (or Helidon) maintains the value you want to log in some context that your code can access and if that value changes as the server runs. In both cases, when your logging format refers to the name logging extracts the corresponding fixed value or invokes the supplier to obtain the value, using the result in log output.
184
184
185
185
`HelidonMdc` works with the supported logging frameworks. But if you prefer, you can
186
186
use a logging framework specific API. Such as `org.slf4j.MDC` or `org.apache.logging.log4j.ThreadContext` instead.
0 commit comments