Initialize Flogger backend in TestLoggingActivator#configureLogging
Instead of initializing the backend in ConfigSuite, initialize it in in TestLoggingActivator#configureLogging. This allows the log config to also be properly configured for test classes that inherit from the GerritBaseTests; TestLoggingActivator#configureLogging is invoked in the @BeforeClass annotated method. Bug: Issue 12673 Change-Id: I65930c0ee80b597d87578c49a5daed80d2e13b6a
This commit is contained in:
@@ -104,10 +104,6 @@ import org.junit.runners.model.InitializationError;
|
||||
* field annotated with {@code @ConfigSuite.Name}.
|
||||
*/
|
||||
public class ConfigSuite extends Suite {
|
||||
static {
|
||||
FloggerInitializer.initBackend();
|
||||
}
|
||||
|
||||
public static final String DEFAULT = "default";
|
||||
|
||||
@Target({METHOD})
|
||||
|
||||
@@ -83,6 +83,7 @@ public class TestLoggingActivator {
|
||||
|
||||
public static void configureLogging() {
|
||||
LogManager.resetConfiguration();
|
||||
FloggerInitializer.initBackend();
|
||||
|
||||
PatternLayout layout = new PatternLayout();
|
||||
layout.setConversionPattern("%-5p %c %x: %m%n");
|
||||
|
||||
Reference in New Issue
Block a user