Skip to content

LoggerTakingImplicits, extract A on implicits #203

Open
@cheatmenot

Description

@cheatmenot

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions