Skip to content

Commit

Permalink
[documentation] add a note about thread-safety for custom loggers
Browse files Browse the repository at this point in the history
Warn user about expected thread-safety guarantee when providing a custom logger factory function

See #3170.
  • Loading branch information
alexismanin committed Aug 30, 2022
1 parent 39f3a2d commit 9caec6e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions reactor-core/src/main/java/reactor/util/Loggers.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ public static void useVerboseConsoleLoggers() {
* The previously active logger factory is simply replaced without
* any particular clean-up.
*
* <h4>Thread-safety</h4>
*
* Given logger acquisition function <em>must</em> be thread-safe.
* It means that it is user responsibility to ensure that any internal state and cache
* used by the provided function is properly synchronized.
*
* @param loggerFactory the {@link Function} that provides a (possibly cached) {@link Logger}
* given a name.
*/
Expand Down

0 comments on commit 9caec6e

Please sign in to comment.