Murtadha Hubail has submitted this change and it was merged.

Change subject: [NO ISSUE][OTH] Use Log4j2 Application Context
......................................................................


[NO ISSUE][OTH] Use Log4j2 Application Context

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Instead of using Log4j2's default LoggerContext, use the
  application context to avoid using incorrect configuration
  for loggers.

Change-Id: Iea86ddc7a505b8f2c816cc4887a6dc46871ae76d
Reviewed-on: https://asterix-gerrit.ics.uci.edu/3116
Reviewed-by: Ali Alsuliman <[email protected]>
Tested-by: Jenkins <[email protected]>
Integration-Tests: Jenkins <[email protected]>
Contrib: Jenkins <[email protected]>
---
M 
hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/LoggingConfigUtil.java
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Ali Alsuliman: Looks good to me, approved
  Jenkins: Verified; ; Verified

Objections:
  Anon. E. Moose #1000171: Violations found
  Jenkins: Violations found



diff --git 
a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/LoggingConfigUtil.java
 
b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/LoggingConfigUtil.java
index a98c241..cf274af 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/LoggingConfigUtil.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/LoggingConfigUtil.java
@@ -34,7 +34,7 @@
     }
 
     public static void defaultIfMissing(String logger, Level defaultLvl) {
-        final Configuration loggingConfig = 
LoggerContext.getContext().getConfiguration();
+        final Configuration loggingConfig = 
LoggerContext.getContext(false).getConfiguration();
         final LoggerConfig loggerConfig = 
loggingConfig.getLoggers().get(logger);
         if (loggerConfig != null) {
             LOGGER.info("{} log level is {}", logger, loggerConfig.getLevel());

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/3116
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iea86ddc7a505b8f2c816cc4887a6dc46871ae76d
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Murtadha Hubail <[email protected]>
Gerrit-Reviewer: Ali Alsuliman <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Murtadha Hubail <[email protected]>

Reply via email to