diff options
Diffstat (limited to 'kamon-uow/src/main/scala/kamon/logging/UowActorLogging.scala')
-rw-r--r-- | kamon-uow/src/main/scala/kamon/logging/UowActorLogging.scala | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/kamon-uow/src/main/scala/kamon/logging/UowActorLogging.scala b/kamon-uow/src/main/scala/kamon/logging/UowActorLogging.scala new file mode 100644 index 00000000..e117db1b --- /dev/null +++ b/kamon-uow/src/main/scala/kamon/logging/UowActorLogging.scala @@ -0,0 +1,14 @@ +package kamon.logging + +import akka.actor.Actor +import kamon.Kamon + +trait UowActorLogging { + self: Actor => + + def logWithUOW(text: String) = { + val uow = Kamon.context.map(_.userContext).getOrElse("NA") + println(s"=======>[$uow] - $text") + } + +} |