Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoggerTakingImplicits, extract A on implicits #203

Open
cheatmenot opened this issue Jan 28, 2020 · 0 comments
Open

LoggerTakingImplicits, extract A on implicits #203

cheatmenot opened this issue Jan 28, 2020 · 0 comments

Comments

@cheatmenot
Copy link

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!

@cheatmenot cheatmenot changed the title LoggerTakingImplicits, access A on CanLog[A] LoggerTakingImplicits, extract A on implicits Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant