Add JBoss Logging and log exceptions when calling the thread context
providers
LGTM, except the wrapping of Throwable, as explained.
Updated. The rethrow is a nice trick!
2020-08-21T12:35:54.6844857Z [ERROR] Failed to execute goal net.revelc.code.formatter:formatter-maven-plugin:2.12.1:validate (default-cli) on project smallrye-context-propagation: File '/home/runner/work/smallrye-context-propagation/smallrye-context-propagation/core/src/main/java/io/smallrye/context/impl/ActiveContextState.java' has not been previously formatted. Please format file and commit before running validation! -> [Help 1]
@kabir also, the formatter plugin dislikes you ;-)
[ERROR] Failed to execute goal net.revelc.code.formatter:formatter-maven-plugin:2.12.1:validate (default-cli) on project smallrye-context-propagation: File '/home/runner/work/smallrye-context-propagation/smallrye-context-propagation/core/src/main/java/io/smallrye/context/impl/ActiveContextState.java' has not been previously formatted. Please format file and commit before running validation! -> [Help 1]
Formatted and util made
TBH I do wonder why we have to log an exception we rethrow, shouldn't it be logged by the caller?
@FroMage AFAICT it gets swallowed by the CP plumbing
@FroMage AFAICT it gets swallowed by the CP plumbing
If we have exception-swallowing in SR-CP I want to know where and fix it. Do you have stack traces?
TBH I do wonder why we have to log an exception we rethrow, shouldn't it be logged by the caller?
We don't really know who the caller is. In my case it was Reactive Messaging which makes a load of these calls, and it was not logged there which made tracking down why streams suddenly stop emitting data tricky. Although it sounds like we've decided that RM using CP is a bug, there could be other complex things calling this. To me it makes sense having it centralised in CP.