@@ -159,7 +159,7 @@ void testNonDefaultConfigLocation(CapturedOutput output) {
159
159
assertThat (output ).contains ("Hello world" ).contains (tmpDir () + "/tmp.log" );
160
160
assertThat (new File (tmpDir () + "/tmp.log" )).doesNotExist ();
161
161
assertThat (configuration .getConfigurationSource ().getFile ().getAbsolutePath ())
162
- .contains ("log4j2-nondefault.xml" );
162
+ .contains ("log4j2-nondefault.xml" );
163
163
assertThat (configuration .getWatchManager ().getIntervalSeconds ()).isEqualTo (30 );
164
164
}
165
165
@@ -236,7 +236,7 @@ void getLoggingConfiguration() {
236
236
this .loggingSystem .setLogLevel (getClass ().getName (), LogLevel .DEBUG );
237
237
LoggerConfiguration configuration = this .loggingSystem .getLoggerConfiguration (getClass ().getName ());
238
238
assertThat (configuration )
239
- .isEqualTo (new LoggerConfiguration (getClass ().getName (), LogLevel .DEBUG , LogLevel .DEBUG ));
239
+ .isEqualTo (new LoggerConfiguration (getClass ().getName (), LogLevel .DEBUG , LogLevel .DEBUG ));
240
240
}
241
241
242
242
@ Test
@@ -391,7 +391,7 @@ void getLoggingConfigurationWithResetLevelReturnsNull() {
391
391
this .loggingSystem .setLogLevel ("com.example.test" , LogLevel .DEBUG );
392
392
LoggerConfiguration configuration = this .loggingSystem .getLoggerConfiguration ("com.example.test" );
393
393
assertThat (configuration )
394
- .isEqualTo (new LoggerConfiguration ("com.example.test" , LogLevel .DEBUG , LogLevel .DEBUG ));
394
+ .isEqualTo (new LoggerConfiguration ("com.example.test" , LogLevel .DEBUG , LogLevel .DEBUG ));
395
395
this .loggingSystem .setLogLevel ("com.example.test" , null );
396
396
LoggerConfiguration updatedConfiguration = this .loggingSystem .getLoggerConfiguration ("com.example.test" );
397
397
assertThat (updatedConfiguration ).isNull ();
@@ -402,17 +402,18 @@ void getLoggingConfigurationWithResetLevelWhenAlreadyConfiguredReturnsParentConf
402
402
LoggerContext loggerContext = (LoggerContext ) LogManager .getContext (false );
403
403
this .loggingSystem .beforeInitialize ();
404
404
this .loggingSystem .initialize (this .initializationContext , null , null );
405
- loggerContext .getConfiguration ().addLogger ("com.example.test" ,
406
- new LoggerConfig ("com.example.test" , org .apache .logging .log4j .Level .INFO , false ));
405
+ loggerContext .getConfiguration ()
406
+ .addLogger ("com.example.test" ,
407
+ new LoggerConfig ("com.example.test" , org .apache .logging .log4j .Level .INFO , false ));
407
408
this .loggingSystem .setLogLevel ("com.example" , LogLevel .WARN );
408
409
this .loggingSystem .setLogLevel ("com.example.test" , LogLevel .DEBUG );
409
410
LoggerConfiguration configuration = this .loggingSystem .getLoggerConfiguration ("com.example.test" );
410
411
assertThat (configuration )
411
- .isEqualTo (new LoggerConfiguration ("com.example.test" , LogLevel .DEBUG , LogLevel .DEBUG ));
412
+ .isEqualTo (new LoggerConfiguration ("com.example.test" , LogLevel .DEBUG , LogLevel .DEBUG ));
412
413
this .loggingSystem .setLogLevel ("com.example.test" , null );
413
414
LoggerConfiguration updatedConfiguration = this .loggingSystem .getLoggerConfiguration ("com.example.test" );
414
415
assertThat (updatedConfiguration )
415
- .isEqualTo (new LoggerConfiguration ("com.example.test" , LogLevel .WARN , LogLevel .WARN ));
416
+ .isEqualTo (new LoggerConfiguration ("com.example.test" , LogLevel .WARN , LogLevel .WARN ));
416
417
}
417
418
418
419
@ Test
@@ -436,7 +437,7 @@ void log4jLevelsArePropagatedToJul() {
436
437
void shutdownHookIsDisabled () {
437
438
assertThat (
438
439
PropertiesUtil .getProperties ().getBooleanProperty (ShutdownCallbackRegistry .SHUTDOWN_HOOK_ENABLED , true ))
439
- .isFalse ();
440
+ .isFalse ();
440
441
}
441
442
442
443
@ Test
@@ -475,9 +476,11 @@ void initializeAddsSpringEnvironmentPropertySource() {
475
476
void nonFileUrlsAreResolvedUsingLog4J2UrlConnectionFactory () {
476
477
this .loggingSystem .beforeInitialize ();
477
478
assertThatIllegalStateException ()
478
- .isThrownBy (() -> this .loggingSystem .initialize (this .initializationContext ,
479
- "http://localhost:8080/shouldnotwork" , null ))
480
- .havingCause ().isInstanceOf (ProtocolException .class ).withMessageContaining ("http has not been enabled" );
479
+ .isThrownBy (() -> this .loggingSystem .initialize (this .initializationContext ,
480
+ "http://localhost:8080/shouldnotwork" , null ))
481
+ .havingCause ()
482
+ .isInstanceOf (ProtocolException .class )
483
+ .withMessageContaining ("http has not been enabled" );
481
484
}
482
485
483
486
private String getRelativeClasspathLocation (String fileName ) {
0 commit comments