Skip to content

Commit

Permalink
Apply suggestions from review #2396
Browse files Browse the repository at this point in the history
  • Loading branch information
ppkarwasz committed Mar 27, 2024
1 parent bfddf70 commit ec77306
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ protected String[] getSupportedTypes() {

@Override
public Configuration getConfiguration(final LoggerContext loggerContext, final ConfigurationSource source) {
final int interval =
PropertyEnvironment.getGlobal().getIntegerProperty(Log4j1Configuration.MONITOR_INTERVAL, 0);
final int interval = loggerContext.getEnvironment().getIntegerProperty(Log4j1Configuration.MONITOR_INTERVAL, 0);
return new PropertiesConfiguration(loggerContext, source, interval);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ protected String[] getSupportedTypes() {

@Override
public Configuration getConfiguration(final LoggerContext loggerContext, final ConfigurationSource source) {
final int interval =
PropertyEnvironment.getGlobal().getIntegerProperty(Log4j1Configuration.MONITOR_INTERVAL, 0);
final int interval = loggerContext.getEnvironment().getIntegerProperty(Log4j1Configuration.MONITOR_INTERVAL, 0);
return new XmlConfiguration(loggerContext, source, interval);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package org.apache.log4j.config;

import static org.apache.logging.log4j.core.config.ConfigurationFactory.LOG4J1_CONFIGURATION_FILE_PROPERTY;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

Expand All @@ -38,7 +39,7 @@
public class AutoConfigTest {

@Test
@SetSystemProperty(key = "log4j.configuration", value = "log4j.xml")
@SetSystemProperty(key = LOG4J1_CONFIGURATION_FILE_PROPERTY, value = "log4j.xml")
public void testListAppender() {
final Logger logger = LogManager.getLogger("test");
final LoggerContext context = LoggerContext.getContext(false);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@

import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.core.impl.CoreKeys;
import org.apache.logging.log4j.test.junit.Tags;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

/**
* Tests the AsyncQueueFullPolicyFactory class.
*/
@Tag(Tags.PARALLEL)
@Tag("parallel")
public class AsyncQueueFullPolicyFactoryTest {

private static final CoreKeys.AsyncQueueFullPolicy DEFAULT = CoreKeys.AsyncQueueFullPolicy.defaultValue();
Expand Down

0 comments on commit ec77306

Please sign in to comment.