Arthur C Arthur C - 1 month ago 23
Scala Question

Turn Slick logging off

Slick fills up the console with a massive amount of log messages. I wanted, like the documentation suggested, to use

slf4j-nop
, so logging is turned off, but Akka needs its own slf4j library.

So I'm left with
akka-slf4j_2.10
that Slick also uses. I've tried many things. Included in my
application.conf
is this (tried with and without "):

logger="OFF"
logger.scala.slick="OFF"
logger.scala.slick.session="OFF"
logger.scala.slick.jdbc.JdbcBackend.statement="OFF"
logger.scala.slick.jdbc="OFF"


It has zero effect.
Can someone help me turn this logging off so I can once again like Slick?

Edit



Some of the log messages I get:

17:16:56.706 [seating-akka.actor.default-dispatcher-8] DEBUG scala.slick.ast.Node$ - Assigned type Int/INTEGER to node InsertColumn SEAT_ID

17:16:56.710 [seating-akka.actor.default-dispatcher-8] DEBUG scala.slick.compiler.QueryCompiler - After phase insertCompiler:

Answer

I've fixed it by adding a logback.xml to src/main/resources:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <logger name="scala.slick" level="INFO" />
</configuration>

I found this somewhere in a Github project.

Comments