This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.typesafe.scalalogging.LazyLogging | |
object toPrettyString extends LazyLogging { | |
def apply(a: Any): String = { | |
try { | |
/* pretty printing uses reflection which could fail in odd environments, so we default toString in that case */ | |
prettyPrint(a) | |
} catch { | |
case t: Throwable => | |
logger.error(s"Error calling toPrettyString with: $a", t) |