Skip to content

Commit

Permalink
debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mrFlick72 committed Oct 6, 2023
1 parent d63e7c9 commit 1c69a51
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
package com.vauthenticator.server.events

import org.slf4j.LoggerFactory
import org.springframework.context.event.EventListener

class SpringEventsCollector(private val eventConsumers: List<EventConsumer>) : EventsCollector {

private val logger = LoggerFactory.getLogger(SpringEventsCollector::class.java)
@EventListener
override fun accept(event: VAuthenticatorEvent) {
logger.debug("event ${event::class.simpleName} is collected")
eventConsumers.forEach {
println(it::class.java)
println(it.handleable(event))
if(it.handleable(event)){
val handleable = it.handleable(event)
logger.debug("event ${event::class.simpleName} is handleable $handleable")
if(handleable){
it.accept(event)
}
}
Expand Down

0 comments on commit 1c69a51

Please sign in to comment.