diff --git a/solr/test-framework/src/test/org/apache/solr/TestLogLevelAnnotations.java b/solr/test-framework/src/test/org/apache/solr/TestLogLevelAnnotations.java index 22c0bb65906..bc5b9431095 100644 --- a/solr/test-framework/src/test/org/apache/solr/TestLogLevelAnnotations.java +++ b/solr/test-framework/src/test/org/apache/solr/TestLogLevelAnnotations.java @@ -34,7 +34,24 @@ public class TestLogLevelAnnotations extends SolrTestCaseJ4 { private static final String bogus_logger_prefix = "org.apache.solr.bogus_logger"; /** - * We don't want a hardocded assumption here because it may change based on how the user runs the test. + *
+ * The default log level of the root logger when this class is loaded by the JVM, Used to validate + * some logger configurations when the tests are run. + *
+ *+ * We don't want a hardcoded assumption here because it may change based on how the user runs the test. + *
+ *
+ * We also don't want to initialize this in a @BeforeClass
method because that will run
+ * after the @BeforeClass
logic of our super class {@link SolrTestCaseJ4}
+ * where the @LogLevel
annotation on this class will be parsed and evaluated -- modifying the
+ * log4j run time configuration.
+ * There is no reason why the @LogLevel
configuration of this class should affect
+ * the "root" Logger, but setting this in static class initialization protect us (as best we can)
+ * against the possibility that it might due to an unforseen (future) bug.
+ *