converted logging to slf4j

This commit is contained in:
jomu
2016-01-04 16:56:38 +00:00
parent f957fb553f
commit e47d765a4b
3 changed files with 11 additions and 13 deletions

View File

@ -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,13 +7,12 @@ 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;
/**
*
@ -25,6 +20,8 @@ import org.junit.Test;
*/
public class FTPConnectionTest {
private final static Logger LOGGER = LoggerFactory.getLogger(FTPConnectionTest.class.getName());
/** the properties loaded from the config file */
Properties props = null;
/** true, if init is complete to execute test */
@ -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);
}
}
}

View File

@ -69,6 +69,12 @@
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>

View File

@ -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;