Skip to content

Instantly share code, notes, and snippets.

@jschwietert
Created July 20, 2017 18:50
Show Gist options
  • Save jschwietert/197c9d409f59d020a5dfd4e24c7c0a20 to your computer and use it in GitHub Desktop.
Save jschwietert/197c9d409f59d020a5dfd4e24c7c0a20 to your computer and use it in GitHub Desktop.
Logging trait in VictorOps unified logging.
trait Logging {
def classLogVariables: LogVariables = Nil
implicit lazy protected[logging] val log = Logger.ClassLogger(this.getClass, classLogVariables)
}
trait ActorLogging extends Logging {
this: akka.actor.Actor =>
implicit override lazy protected[logging] val log = Logger.ActorLogger(this, classLogVariables)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment