From 777ceb507102b7d4af598debbffbb18278e6cd20 Mon Sep 17 00:00:00 2001 From: dbeaumont Date: Thu, 4 Feb 2021 12:30:10 -0800 Subject: [PATCH] Internal change RELNOTES=n/a PiperOrigin-RevId: 355686431 --- .../google/common/flogger/context/ScopedLoggingContext.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/src/main/java/com/google/common/flogger/context/ScopedLoggingContext.java b/api/src/main/java/com/google/common/flogger/context/ScopedLoggingContext.java index ac57922d..c4b12570 100644 --- a/api/src/main/java/com/google/common/flogger/context/ScopedLoggingContext.java +++ b/api/src/main/java/com/google/common/flogger/context/ScopedLoggingContext.java @@ -67,6 +67,10 @@ * This is not guaranteed however and the semantic behaviour of context propagation is not defined * by this class. * + *

In particular, if you haven't explicitly opened a context in which to run your code, there is + * no guarantee that a default "global" context exists. In this case any attempts to add metadata + * (e.g. via {@link #addTags}) will fail, returning {@code false}. + * *

Context support and automatic propagation is heavily reliant on Java platform capabilities, * and precise behaviour is likely to differ between runtime environments or frameworks. Context * propagation may not behave the same everywhere, and in some situations logging contexts may not