Skip to content

Problem with error logging having a throwable in the interpolated string #95

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

Closed
ranweizman opened this issue Aug 28, 2017 · 0 comments · Fixed by #305
Closed

Problem with error logging having a throwable in the interpolated string #95

ranweizman opened this issue Aug 28, 2017 · 0 comments · Fixed by #305

Comments

@ranweizman
Copy link

ranweizman commented Aug 28, 2017

Assuming the following code

case class Example(i: Int) extends Throwable {
     override def toString: String = s"$i"
}
val exampleObject = Example(3)
logger.error(s"Example $exampleObject")

I would expect the message output to be

Example 3

Instead I get

Example {}
@ranweizman ranweizman changed the title logger.error macro error with Throwable as one of the arguments in the interpolated string Problem with error logging having a throwable in the interpolated string Aug 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant