diff options
author | Vitaly Takmazov | 2016-07-11 12:25:03 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-07-11 12:25:03 +0300 |
commit | d6fb4288688294d2f76325f14410db3091fea0fa (patch) | |
tree | d2070a67794644c2602eaf5bcc41e10438c62f89 /juick-www/src/main/java/com/juick/www/Utils.java | |
parent | 3d0ec22f5262058a08e7f551eb5ac02e3636008a (diff) |
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.java | 6 |
1 files changed, 5 insertions, 1 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 ccb7cdd2..240b6be4 100644 --- a/juick-www/src/main/java/com/juick/www/Utils.java +++ b/juick-www/src/main/java/com/juick/www/Utils.java @@ -28,6 +28,8 @@ import java.io.*; import java.net.URL; import java.net.URLConnection; import java.util.UUID; +import java.util.logging.Level; +import java.util.logging.Logger; /** * @@ -35,6 +37,8 @@ import java.util.UUID; */ public class Utils { + private static final Logger logger = Logger.getLogger(Utils.class.getName()); + public static String getCookie(HttpServletRequest request, String name) { Cookie cookies[] = request.getCookies(); if (cookies != null) { @@ -157,7 +161,7 @@ public class Utils { in.close(); return b.toString(); } catch (Exception e) { - System.err.println("fetchURL: "+e.toString()); + logger.log(Level.SEVERE, "fetchURL" , e); return null; } } |