I\'m new to Scala, and not that familiar with recent developments in Java, so I am having what I assume is a basic problem.
I\'m writing some Scala code, and testing
I had the same issue. Ended up just instantiating an empty logger in the class definition.
If I applied my method to your code then it would be,
import com.weiglewilczek.slf4s.{Logger, Logging}
class MyClass with Logging {
val _ = Logger("") // <--Solved problem
def doSomething() {
logger.debug("Hello world")
}
}
Note that I am very new to scala so I don't know the full implications of what I have just done.