How can I add silencable logging to my sbt Scala project? -


i'm new @ logging , i've got println debugging able silence.

i tried scala logging logback (runnable example), i'm surprised can't silence new logger changing sbt log level, e.g. > warn.

can sbt control logger's log levels?

or should trying use sbt's logger instead?

logback has own configuration file control logging in application. need "logback.xml" in src/main/resources folder configure. below simple example, control log @ levels , below case not print out debug level logs. in addtion, can set complexed loggings such file based logging , more. see http://logback.qos.ch/manual/configuration.html detail

<configuration>   <appender name="console" class="ch.qos.logback.core.consoleappender">     <encoder>       <pattern>%d{yyyy-mm-dd hh:mm:ss.sss}: %msg%n</pattern>     </encoder>   </appender>   <root level="info">     <appender-ref ref="console" />   </root> </configuration> 

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -