updated logging
This commit is contained in:
parent
066781edb9
commit
8985476e61
@ -31,7 +31,7 @@ class Coordinator() : CoordinatorBase<PersistentMessage, PersistentEventBasedMes
|
||||
override fun onMessageReceived(event: DeserializedConsumerRecord<KafkaEvents, Message<out MessageDataWrapper>>) {
|
||||
val success = eventManager.setEvent(event.key, event.value)
|
||||
if (!success) {
|
||||
log.error { "Unable to store message event: ${event.key.event} with eventId ${event.value.eventId} with referenceId ${event.value.referenceId} in database ${getEventsDatabase().database}!" }
|
||||
log.error { "Failed to store message event\nReferenceId: ${event.value.referenceId}\n\tEventId: ${event.value.eventId}\n\tEvent: ${event.key.event}\n\nData:\n${event.value.data}" }
|
||||
} else {
|
||||
io.launch {
|
||||
readAllMessagesFor(event.value.referenceId, event.value.eventId, event.key.event)
|
||||
|
||||
@ -202,12 +202,16 @@ class PersistentEventManager(private val dataSource: DataSource) {
|
||||
val success = if (exception != null) {
|
||||
if (exception.isExposedSqlException()) {
|
||||
if ((exception as ExposedSQLException).isCausedByDuplicateError()) {
|
||||
log.info { "Error is of SQLIntegrityConstraintViolationException" }
|
||||
log.debug { "Error is of SQLIntegrityConstraintViolationException" }
|
||||
log.error { exception.message }
|
||||
exception.printStackTrace()
|
||||
} else {
|
||||
log.info { "Error code is: ${exception.errorCode}" }
|
||||
log.debug { "Error code is: ${exception.errorCode}" }
|
||||
log.error { exception.message }
|
||||
exception.printStackTrace()
|
||||
}
|
||||
} else {
|
||||
log.error { exception.message }
|
||||
exception.printStackTrace()
|
||||
}
|
||||
false
|
||||
|
||||
Loading…
Reference in New Issue
Block a user