TSK-1100 Replaced printStackTrace by error logging
This commit is contained in:
parent
1ecb613526
commit
91f17fb221
|
@ -27,7 +27,7 @@ public class DbSchemaCreator {
|
|||
private StringWriter errorWriter = new StringWriter();
|
||||
private PrintWriter errorLogWriter = new PrintWriter(errorWriter);
|
||||
|
||||
public DbSchemaCreator(DataSource dataSource, String schema) throws SQLException {
|
||||
public DbSchemaCreator(DataSource dataSource, String schema) {
|
||||
this.dataSource = dataSource;
|
||||
this.schemaName = schema;
|
||||
}
|
||||
|
@ -69,8 +69,7 @@ public class DbSchemaCreator {
|
|||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
LOGGER.error("SchemaName sql parsing failed for schemaName {}", schemaName);
|
||||
LOGGER.error("SchemaName SQL parsing failed for schemaName {}", schemaName, e);
|
||||
}
|
||||
return new StringReader(content.toString());
|
||||
}
|
||||
|
|
|
@ -32,7 +32,6 @@ public class SimpleHistoryServiceImpl implements TaskanaHistory {
|
|||
}
|
||||
} catch (SQLException e) {
|
||||
LOGGER.error("There was an error creating Taskana history engine", e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
this.historyEventMapper =
|
||||
this.taskanaHistoryEngine.getSqlSession().getMapper(HistoryEventMapper.class);
|
||||
|
@ -50,10 +49,10 @@ public class SimpleHistoryServiceImpl implements TaskanaHistory {
|
|||
}
|
||||
historyEventMapper.insert(event);
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
LOGGER.error("Error while inserting history event into historyEventMapper", e);
|
||||
} finally {
|
||||
taskanaHistoryEngine.returnConnection();
|
||||
LOGGER.debug("exit from create(TaskanaHistoryEvent event). Returning object = {}.", event);
|
||||
LOGGER.debug("Exit from create(TaskanaHistoryEvent event). Returning object = {}.", event);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue