diff options
Diffstat (limited to 'src/main/java/com/juick/jabber/ws/WSKeepAlive.java')
-rw-r--r-- | src/main/java/com/juick/jabber/ws/WSKeepAlive.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/com/juick/jabber/ws/WSKeepAlive.java b/src/main/java/com/juick/jabber/ws/WSKeepAlive.java index f253439d..6244013d 100644 --- a/src/main/java/com/juick/jabber/ws/WSKeepAlive.java +++ b/src/main/java/com/juick/jabber/ws/WSKeepAlive.java @@ -5,12 +5,15 @@ import org.springframework.jdbc.core.JdbcTemplate; import java.io.PrintWriter; import java.nio.ByteBuffer; import java.util.Iterator; +import java.util.logging.Level; +import java.util.logging.Logger; /** * * @author ugnich */ public class WSKeepAlive implements Runnable { + private static final Logger logger = Logger.getLogger(WSKeepAlive.class.getName()); JdbcTemplate sql; ByteBuffer pingBytes; @@ -44,7 +47,7 @@ public class WSKeepAlive implements Runnable { statsFile = new PrintWriter(Main.STATSFILE, "UTF-8"); } catch (Exception e) { statsFile = null; - System.err.println("WSKeepAlive statsFile: " + e); + logger.severe("WSKeepAlive statsFile: " + e); } } @@ -69,7 +72,7 @@ public class WSKeepAlive implements Runnable { statsFile.print("<td>" + (s.allMessages ? "+" : "") + "</td>"); statsFile.print("<td>" + (s.allReplies ? "+" : "") + "</td></tr>"); } catch (Exception e) { - System.err.println("WSKeepAlive statsFile print: " + e); + logger.log(Level.SEVERE, "WSKeepAlive statsFile print", e); } } @@ -90,7 +93,7 @@ public class WSKeepAlive implements Runnable { statsFile.write("</table></body></html>"); statsFile.close(); } catch (Exception e) { - System.err.println("WSKeepAlive statsFile close: " + e); + logger.log(Level.SEVERE, "WSKeepAlive statsFile close", e); } } |