Commit 3d054e1b authored by Thomas Bernhart's avatar Thomas Bernhart
Browse files

MEMO-733: Write exception and stacktrace to error log

parent 7c0ae8a5
Pipeline #15074 passed with stages
in 5 minutes and 3 seconds
......@@ -28,8 +28,7 @@ class App {
val service = Service()
service.run()
} catch (ex: Exception) {
ex.printStackTrace()
log.error("Stopping application due to error: " + ex.message)
log.error("Stopping application due to error: ${ex.localizedMessage}", ex)
exitProcess(1)
}
}
......
......@@ -99,8 +99,7 @@ class Service(fileName: String = "app.yml") : Closeable {
message = ReportMessages.ingestedRecord(record.key())
)
} catch (ex: Exception) {
log.error("Ingestion of record ${record.key()} failed: ${ex.localizedMessage}.")
log.error(ex.stackTrace)
log.error("Ingestion of record ${record.key()} failed: ${ex.localizedMessage}", ex)
Report(
id = record.key(),
status = ReportStatus.failure,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment