aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www/Utils.java
diff options
context:
space:
mode:
authorGravatar Alexander Alexeev2016-11-10 04:50:07 +0700
committerGravatar Vitaly Takmazov2016-11-10 21:41:14 +0300
commit09221ab5695e99b2df1130ea923c39625ec85429 (patch)
tree58c775188d25239a1e32a83f8007e5f1679d49ee /juick-www/src/main/java/com/juick/www/Utils.java
parent705d4f87c97dfa20eb6daa88b93ff124fa401b92 (diff)
using slf4j + logback for logging
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/Utils.java')
-rw-r--r--juick-www/src/main/java/com/juick/www/Utils.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/juick-www/src/main/java/com/juick/www/Utils.java b/juick-www/src/main/java/com/juick/www/Utils.java
index 4be659cb..c236ac62 100644
--- a/juick-www/src/main/java/com/juick/www/Utils.java
+++ b/juick-www/src/main/java/com/juick/www/Utils.java
@@ -19,6 +19,8 @@ package com.juick.www;
import com.juick.User;
import com.mitchellbosecke.pebble.PebbleEngine;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.jdbc.core.JdbcTemplate;
import javax.servlet.ServletException;
@@ -31,8 +33,6 @@ import java.net.URL;
import java.net.URLConnection;
import java.nio.file.Paths;
import java.util.UUID;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -42,7 +42,8 @@ import java.util.regex.Pattern;
*/
public class Utils {
- private static final Logger logger = Logger.getLogger(Utils.class.getName());
+ private static final Logger logger = LoggerFactory.getLogger(Utils.class);
+
private static final PebbleEngine engine = new PebbleEngine.Builder().build();
private static String tmpDir = "/var/www/juick.com/i/tmp/";
@@ -153,7 +154,7 @@ public class Utils {
in.close();
return b.toString();
} catch (Exception e) {
- logger.log(Level.SEVERE, "fetchURL" , e);
+ logger.error("fetchURL" , e);
return null;
}
}