diff options
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.java | 9 |
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; } } |