package com.tylerstonge.honeypot.reporter import akka.actor.{Actor, Props} import akka.event.{Logging, LoggingAdapter} import com.tylerstonge.honeypot.messages.{MFoundFile, MFoundPassword, MFoundUsername} class LogReporter extends Actor { val log: LoggingAdapter = Logging(context.system, this) context.system.eventStream.subscribe(self, classOf[MFoundUsername]) context.system.eventStream.subscribe(self, classOf[MFoundPassword]) context.system.eventStream.subscribe(self, classOf[MFoundFile]) override def receive: Receive = { case msg: MFoundUsername => log.info(">> REPORTER >> :: {}", msg.username) case msg: MFoundPassword => log.info(">> REPORTER >> :: {}", msg.password) case msg: MFoundFile => log.info(">> REPORTER >> :: {}", msg.filename) } }