aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server/CrosspostQueries.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-01-10 16:56:51 +0300
committerGravatar Vitaly Takmazov2016-01-10 16:56:51 +0300
commitc37ed56f884661666b964e47efd23a36be9b24d4 (patch)
tree64917e400d9c97fac185b4f34fd0063314bb7937 /src/main/java/com/juick/server/CrosspostQueries.java
parent439d42ef6d60f0a535fdfa2457da8417b70d966a (diff)
logger, diamond and arraylist refactoring
Diffstat (limited to 'src/main/java/com/juick/server/CrosspostQueries.java')
-rw-r--r--src/main/java/com/juick/server/CrosspostQueries.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/com/juick/server/CrosspostQueries.java b/src/main/java/com/juick/server/CrosspostQueries.java
index fd677048..b44b6b59 100644
--- a/src/main/java/com/juick/server/CrosspostQueries.java
+++ b/src/main/java/com/juick/server/CrosspostQueries.java
@@ -21,6 +21,8 @@ import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
/**
*
@@ -28,6 +30,8 @@ import java.sql.SQLException;
*/
public class CrosspostQueries {
+ private static final Logger logger = Logger.getLogger(CrosspostQueries.class.getName());
+
public static String[] getTwitterTokens(Connection sql, int uid) {
String tokens[] = null;
@@ -43,7 +47,7 @@ public class CrosspostQueries {
tokens[1] = rs.getString(2);
}
} catch (SQLException e) {
- System.err.println(e);
+ logger.log(Level.SEVERE, "sql exception", e);
} finally {
Utils.finishSQL(rs, stmt);
}
@@ -70,7 +74,7 @@ public class CrosspostQueries {
tokens[1] = rs.getString(2);
}
} catch (SQLException e) {
- System.err.println(e);
+ logger.log(Level.SEVERE, "sql exception", e);
} finally {
Utils.finishSQL(rs, stmt);
}