This repository was archived by the owner on Jun 7, 2021. It is now read-only.
APEXCORE-169 - instantiating DTLoggerFactory during test causes incorrect logging behavior#375
Merged
asfgit merged 2 commits intoapache:masterfrom Aug 27, 2016
Merged
Conversation
added 2 commits
August 25, 2016 13:33
…rect logging behavior
…rect logging behavior
| org.apache.log4j.Logger streamingAppMasterLogger = LogManager.getLogger(StreamingAppMaster.class); | ||
| Assert.assertNull(streamingAppMasterLogger.getLevel()); | ||
| Map<String, String> changes = Maps.newHashMap(); | ||
| changes.put("_.org.apache.*", "WARN"); |
Contributor
There was a problem hiding this comment.
Are the logger names expected to be prefixed with _. now or is this just to isolate the test? Does anything change for the user (config, web service)?
Member
Author
There was a problem hiding this comment.
"_." is to avoid impacting log level during unit tests. There is no change in how log levels are set during run-time.
Contributor
|
Did you test dynamic log level change on the running app? |
Member
Author
|
Yes, I tested setting log level for a running application. It works as before, except that log levels of newly created loggers that don't match pattern will be set based on nearest matching log level of ancestor specification, instead of the root logger. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@tweise, @ChandniSingh Please review