Skip to content

Commit

Permalink
Remove wrong logger. Add correct one
Browse files Browse the repository at this point in the history
  • Loading branch information
dfuchss committed Dec 3, 2023
1 parent c5c4441 commit cecfe45
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.logging.Logger;

import org.apache.commons.lang3.SystemUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import de.jplag.endtoend.model.DataSet;

public class UnzipManager {
private final Map<DataSet, File> unzippedFiles;
private static UnzipManager instance;
private final Logger logger = Logger.getLogger("Unzip Manager");
private final Logger logger = LoggerFactory.getLogger(UnzipManager.class);

private static synchronized UnzipManager getInstance() {
if (instance == null) {
Expand Down Expand Up @@ -46,7 +47,7 @@ private File unzipOrCacheInternal(DataSet dataSet, File zip) throws IOException
} else {
target = Files.createTempDirectory(zip.getName()).toFile();
if (!(target.setReadable(true, true) && target.setWritable(true, true) && target.setExecutable(true, true))) {
logger.warning("Could not set permissions for temp directory (" + target.getAbsolutePath() + ").");
logger.warn("Could not set permissions for temp directory ({}).", target.getAbsolutePath());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;

import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import de.jplag.Language;
import de.jplag.ParsingException;
Expand All @@ -40,7 +40,7 @@
public abstract class LanguageModuleTest {
private static final Path DEFAULT_TEST_CODE_PATH_BASE = Path.of("src", "test", "resources", "de", "jplag");

private final Logger LOG = Logger.getLogger(this.getClass().getName());
private final Logger logger = LoggerFactory.getLogger(this.getClass());

private final TestDataCollector collector;
private final Language language;
Expand Down Expand Up @@ -253,7 +253,7 @@ final void collectTestData() {

private List<Token> parseTokens(TestData source) throws ParsingException, IOException {
List<Token> tokens = source.parseTokens(this.language);
LOG.log(Level.INFO, TokenPrinter.printTokens(tokens));
logger.info(TokenPrinter.printTokens(tokens));
return tokens;
}

Expand Down

0 comments on commit cecfe45

Please sign in to comment.