Skip to content

Instantly share code, notes, and snippets.

@xerial
Last active June 26, 2018 05:49
Show Gist options
  • Save xerial/0c909e58cc4147d4621efc1221e1d13f to your computer and use it in GitHub Desktop.
Save xerial/0c909e58cc4147d4621efc1221e1d13f to your computer and use it in GitHub Desktop.
import org.scalatest._
import wvlet.log.LogFormatter.SourceCodeLogFormatter
trait Spec extends WordSpec with Matchers with LogSupport {
override def run(testName: Option[String], args: Args): Status = {
// Add source code location to the debug logs
Logger.setDefaultFormatter(SourceCodeLogFormatter)
// Periodically scan log level file
Logger.scheduleLogLevelScan
val s = super.run(testName, args)
Logger.stopScheduledLogLevelScan
s
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment