scala-logging
scala-logging copied to clipboard
LoggerTakingImplicits, extract A on implicits
Currently, I am using the LoggerTakingImplicit[A]
and CanLog[A]
in which A
will be a context object used to append custom properties on logs but currently scala-logging doesn't let me use context A
outside CanLog[A]
. Use case is I need to add an appender and I need to get properties on my context A
.
I imagine like this
val a = Logger.takingImplicit[ContextA](logger)
val context = a.canLogEv.getA()
or you can just make LoggerTakingImplicitMacro to public and remove the final modifier on LoggerTakingImplicit so we can do it custom. Thanks!