From 03316e2af6989e026318e6860f27d26e6e805d4d Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 22 Dec 2015 16:40:00 +0300 Subject: initial logging --- src/main/java/com/juick/server/UserQueries.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3