diff options
Diffstat (limited to 'kamon-core/src/main/scala/kamon')
-rw-r--r-- | kamon-core/src/main/scala/kamon/Kamon.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kamon-core/src/main/scala/kamon/Kamon.scala b/kamon-core/src/main/scala/kamon/Kamon.scala index eb0b56ef..44e895bd 100644 --- a/kamon-core/src/main/scala/kamon/Kamon.scala +++ b/kamon-core/src/main/scala/kamon/Kamon.scala @@ -16,13 +16,16 @@ package kamon import akka.actor._ -import akka.event.Logging.Info +import akka.event.Logging.{ Info, Error } object Kamon { trait Extension extends akka.actor.Extension { def publishInfoMessage(system: ActorSystem, msg: String): Unit = { system.eventStream.publish(Info("", classOf[Extension], msg)) } + def publishErrorMessage(system: ActorSystem, msg: String, cause: Throwable): Unit = { + system.eventStream.publish(new Error(cause, "", classOf[Extension], msg)) + } } def apply[T <: Extension](key: ExtensionId[T])(implicit system: ActorSystem): T = key(system) |