[hibernate-issues] [Hibernate-JIRA] Created: (HHH-7083) Error log not print stacktrace

Evgeny Terentev (JIRA) noreply at atlassian.com
Sun Feb 19 01:26:11 EST 2012


Error log not print stacktrace 
-------------------------------

                 Key: HHH-7083
                 URL: https://hibernate.onjira.com/browse/HHH-7083
             Project: Hibernate ORM
          Issue Type: Improvement
            Reporter: Evgeny Terentev
            Priority: Trivial


in SqlExceptionHelper
if log level ERROR hibernate not print stacktrace, only print message

    public void logExceptions( SQLException sqlException,
                               String message ) {
        if (LOG.isEnabled(Level.ERROR)) {
            if (LOG.isDebugEnabled()) {
                message = StringHelper.isNotEmpty(message) ? message : DEFAULT_EXCEPTION_MSG;
				LOG.debug( message, sqlException );
            }
            while (sqlException != null) {
                StringBuilder buf = new StringBuilder(30).append("SQL Error: ").append(sqlException.getErrorCode()).append(", SQLState: ").append(sqlException.getSQLState());
                LOG.warn(buf.toString());
                LOG.error(sqlException.getMessage());
                sqlException = sqlException.getNextException();
            }
        }
    }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list