Skip to content

Commit

Permalink
Fix DisableLoggingFeature in Narayana JTA
Browse files Browse the repository at this point in the history
The log level we get in beforeAnalysis may be null, in which case we
still want to reset it after analysis.

From the javadoc of Logger#getLevel:

> Get the log Level that has been specified for this Logger.
> The result may be null, which means that this logger's effective level will be inherited from its parent.

(cherry picked from commit d5c2ed5)
  • Loading branch information
yrodiere authored and gsmet committed May 14, 2024
1 parent 69d5d3d commit 002499f
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ public void beforeAnalysis(BeforeAnalysisAccess access) {
public void afterAnalysis(AfterAnalysisAccess access) {
for (String category : CATEGORIES) {
Level level = categoryMap.remove(category);
if (level != null) {
Logger logger = Logger.getLogger(category);
logger.setLevel(level);
}
Logger logger = Logger.getLogger(category);
logger.setLevel(level);
}
}

Expand Down

0 comments on commit 002499f

Please sign in to comment.