Last active
June 26, 2018 05:49
-
-
Save xerial/0c909e58cc4147d4621efc1221e1d13f to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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