Summary on resolution, I thought I was dealing with a Scala problem but it turns out Stopwatch and Scala Logging have private constructors, and I was not calling the proper
The constructors of both Stopwatch
and Logger
are private. You need to use factory methods to instantiate them.
In case of the Stopwatch
, you could use the createUnstarted() method:
val stopwatch = Stopwatch.createUnstarted()
In case of Logger
, you must use the apply
method. However, it requires an underlying SLF4J logger. You can create one through SLF4J's LoggerFactory
:
import org.slf4j.LoggerFactory
val logger = Logger(LoggerFactory.getLogger(getClass))