If you want to log using Logback, you need to create a basic xml file with the name src/main/resources/props/default.logback.xml(the file name may differ from the development and production environment, but it’s easy to save it).
In this file, the main configuration that will be written to the console is as follows:
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<root level="debug">
<appender-ref ref="STDOUT" />
</root>
</configuration>
( .)
"ch.qos.logback" % "logback-classic" % "0.9.26"
sbt.
, , Logger, debug, info, warn,... .
class SomeClass extends SomeOtherClass with Logger {
debug("Class initialised.")
}
, , Loggable, - Logger.
class SomeClass extends SomeOtherClass with Loggable {
logger.debug("Class initialised.")
}
. wiki.