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 StringWriter errorWriter = new StringWriter();
|
||||||
private PrintWriter errorLogWriter = new PrintWriter(errorWriter);
|
private PrintWriter errorLogWriter = new PrintWriter(errorWriter);
|
||||||
|
|
||||||
public DbSchemaCreator(DataSource dataSource, String schema) throws SQLException {
|
public DbSchemaCreator(DataSource dataSource, String schema) {
|
||||||
this.dataSource = dataSource;
|
this.dataSource = dataSource;
|
||||||
this.schemaName = schema;
|
this.schemaName = schema;
|
||||||
}
|
}
|
||||||
|
|
@ -69,8 +69,7 @@ public class DbSchemaCreator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
LOGGER.error("SchemaName SQL parsing failed for schemaName {}", schemaName, e);
|
||||||
LOGGER.error("SchemaName sql parsing failed for schemaName {}", schemaName);
|
|
||||||
}
|
}
|
||||||
return new StringReader(content.toString());
|
return new StringReader(content.toString());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ public class SimpleHistoryServiceImpl implements TaskanaHistory {
|
||||||
}
|
}
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
LOGGER.error("There was an error creating Taskana history engine", e);
|
LOGGER.error("There was an error creating Taskana history engine", e);
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
this.historyEventMapper =
|
this.historyEventMapper =
|
||||||
this.taskanaHistoryEngine.getSqlSession().getMapper(HistoryEventMapper.class);
|
this.taskanaHistoryEngine.getSqlSession().getMapper(HistoryEventMapper.class);
|
||||||
|
|
@ -50,10 +49,10 @@ public class SimpleHistoryServiceImpl implements TaskanaHistory {
|
||||||
}
|
}
|
||||||
historyEventMapper.insert(event);
|
historyEventMapper.insert(event);
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
e.printStackTrace();
|
LOGGER.error("Error while inserting history event into historyEventMapper", e);
|
||||||
} finally {
|
} finally {
|
||||||
taskanaHistoryEngine.returnConnection();
|
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