From e47d765a4b6535a7d91b562ba1a336c18d063744 Mon Sep 17 00:00:00 2001 From: jomu Date: Mon, 4 Jan 2016 16:56:38 +0000 Subject: [PATCH] converted logging to slf4j --- .../shared/network/ftp/FTPConnectionTest.java | 13 +++++-------- pom.xml | 6 ++++++ .../muehlencord/shared/util/file/FileUtilTest.java | 5 ----- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/network/src/test/java/de/muehlencord/shared/network/ftp/FTPConnectionTest.java b/network/src/test/java/de/muehlencord/shared/network/ftp/FTPConnectionTest.java index ed8bf96..005fbfd 100644 --- a/network/src/test/java/de/muehlencord/shared/network/ftp/FTPConnectionTest.java +++ b/network/src/test/java/de/muehlencord/shared/network/ftp/FTPConnectionTest.java @@ -1,7 +1,3 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ package de.muehlencord.shared.network.ftp; import java.io.File; @@ -11,19 +7,20 @@ import java.net.URL; import java.util.List; import java.util.Locale; import java.util.Properties; -import java.util.logging.Level; -import java.util.logging.Logger; -import static java.util.logging.Logger.getLogger; import static org.junit.Assert.*; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * * @author jomu */ public class FTPConnectionTest { + + private final static Logger LOGGER = LoggerFactory.getLogger(FTPConnectionTest.class.getName()); /** the properties loaded from the config file */ Properties props = null; @@ -58,7 +55,7 @@ public class FTPConnectionTest { fin.close(); } } catch (IOException ex) { - getLogger(FTPConnectionTest.class.getName()).log(Level.SEVERE, null, ex); + LOGGER.error (ex.toString(), ex); } } } diff --git a/pom.xml b/pom.xml index 26c8079..9fdab77 100644 --- a/pom.xml +++ b/pom.xml @@ -69,6 +69,12 @@ slf4j-api ${slf4j.version} + + org.slf4j + slf4j-log4j12 + ${slf4j.version} + + javax.mail diff --git a/util/src/test/java/de/muehlencord/shared/util/file/FileUtilTest.java b/util/src/test/java/de/muehlencord/shared/util/file/FileUtilTest.java index 8735587..33b090c 100644 --- a/util/src/test/java/de/muehlencord/shared/util/file/FileUtilTest.java +++ b/util/src/test/java/de/muehlencord/shared/util/file/FileUtilTest.java @@ -1,7 +1,3 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ package de.muehlencord.shared.util.file; import static de.muehlencord.shared.util.file.FileUtil.getFilesFromDirecotry; @@ -11,7 +7,6 @@ import java.net.URISyntaxException; import java.net.URL; import java.util.Iterator; import java.util.List; -import static org.junit.Assert.assertEquals; import org.junit.Ignore; import org.junit.Test;