Skip to content

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

Closed
@ranweizman

Description

@ranweizman

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 {}

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