
org.log4s.LoggedThrowable.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of log4s-testing_sjs1_2.12 Show documentation
Show all versions of log4s-testing_sjs1_2.12 Show documentation
Utilities to help with build-time unit tests for logging
The newest version!
package org.log4s
import ch.qos.logback.classic.spi.IThrowableProxy
final class LoggedThrowable private[log4s] (val inner: IThrowableProxy) extends AnyVal {
def cause: Option[LoggedThrowable] = Option(inner.getCause()).map(new LoggedThrowable(_))
def className: String = inner.getClassName()
def commonFrames: Int = inner.getCommonFrames()
def message: Option[String] = Option(inner.getMessage())
def stackTrace: IndexedSeq[StackTraceElement] = inner.getStackTraceElementProxyArray().map(_.getStackTraceElement()).toIndexedSeq
}