CLOUDSTACK-7039: don't log exception stackTrace when catch sql exception on system/admin user/account insert
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b517156f Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b517156f Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b517156f Branch: refs/heads/vpc-toolkit-hugo Commit: b517156fe337ea209effaf2645e6ad7497540ea7 Parents: 5a96d8e Author: Alena Prokharchyk <alena.prokharc...@citrix.com> Authored: Mon Jul 7 16:44:18 2014 -0700 Committer: Alena Prokharchyk <alena.prokharc...@citrix.com> Committed: Mon Jul 7 16:45:23 2014 -0700 ---------------------------------------------------------------------- server/src/com/cloud/server/ConfigurationServerImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b517156f/server/src/com/cloud/server/ConfigurationServerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/server/ConfigurationServerImpl.java b/server/src/com/cloud/server/ConfigurationServerImpl.java index b66e52d..7c3b5a5 100755 --- a/server/src/com/cloud/server/ConfigurationServerImpl.java +++ b/server/src/com/cloud/server/ConfigurationServerImpl.java @@ -464,7 +464,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql); stmt.executeUpdate(); } catch (SQLException ex) { - s_logger.debug("Caught SQLException when inserting system account ", ex); + s_logger.debug("Caught exception when inserting system account: " + ex.getMessage()); } // insert system user insertSql = "INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname, lastname, created, user.default)" @@ -474,7 +474,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql); stmt.executeUpdate(); } catch (SQLException ex) { - s_logger.debug("Caught SQLException when inserting system user ", ex); + s_logger.debug("Caught SQLException when inserting system user: " + ex.getMessage()); } // insert admin user, but leave the account disabled until we set a @@ -491,7 +491,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql); stmt.executeUpdate(); } catch (SQLException ex) { - s_logger.debug("Caught SQLException when creating admin account ", ex); + s_logger.debug("Caught SQLException when creating admin account: " + ex.getMessage()); } // now insert the user @@ -502,7 +502,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql); stmt.executeUpdate(); } catch (SQLException ex) { - s_logger.debug("Caught SQLException when inserting user ", ex); + s_logger.debug("Caught SQLException when inserting admin user: " + ex.getMessage()); } try {