diff options
author | Vitaly Takmazov | 2015-12-22 16:40:00 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2015-12-22 16:40:00 +0300 |
commit | 03316e2af6989e026318e6860f27d26e6e805d4d (patch) | |
tree | e0647196c1e090eea89bc1785732e52c66e845db /src/main/java/com/juick/server/UserQueries.java | |
parent | 512d0b353f28e241937be3fa146617ba8ff97c9c (diff) |
initial logging
Diffstat (limited to 'src/main/java/com/juick/server/UserQueries.java')
-rw-r--r-- | src/main/java/com/juick/server/UserQueries.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/com/juick/server/UserQueries.java b/src/main/java/com/juick/server/UserQueries.java index 95944ce0..7e3a212b 100644 --- a/src/main/java/com/juick/server/UserQueries.java +++ b/src/main/java/com/juick/server/UserQueries.java @@ -27,6 +27,7 @@ import java.sql.Statement; import java.util.ArrayList; import java.util.Random; import java.util.UUID; +import java.util.logging.Logger; /** * @@ -36,6 +37,8 @@ public class UserQueries { static final String ABCDEF = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + private static Logger logger = Logger.getLogger(UserQueries.class.getName()); + public static String getSignUpHashByJID(Connection sql, String jid) { String hash = SQLHelpers.getString(sql, "SELECT loginhash FROM jids WHERE jid=? AND user_id IS NULL", jid); @@ -583,7 +586,7 @@ public class UserQueries { PreparedStatement stmt = sql.prepareStatement("INSERT INTO twitter(user_id,access_token,access_token_secret,uname) " + "VALUES (?,?,?,?)" + - " ON DUPLICATE KEY UPDATE access_token=?,access_token_secret=?,uname=?;"); + " ON DUPLICATE KEY UPDATE access_token=?,access_token_secret=?,uname=?"); stmt.setInt(1, user.UID); stmt.setString(2, accessToken); stmt.setString(3, accessTokenSecret); @@ -599,7 +602,7 @@ public class UserQueries { return stmt2.execute(); } } catch (SQLException e) { - + logger.throwing(UserQueries.class.getName(), "linkTwitterAccount", e); } return false; } |