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:
The most common reason for the above steps mentioned not working is because your xx.xml logback file is not being read. Check if it is in the correct class path.
The only setting required in the xx.xml file to change level of slick logging is:
In case of sbt, if the resources folder is not under src/main the path can be mentioned as follows:
When sbt assembly is done it will dump the logback configuration files into the fat jar
In case of running from jar
In case from Intellij, ensure the folder containing the logback conf file like dev-logger.xml is marked as resources folder. If the configuration file is logback.xml it will take by default else you will need to mention it in the VM settings in run configuration
Have you tried turning off akka logging in
application.conf
?See "Turning Off Logging" section in the documentation.
I've fixed it by adding a
logback.xml
tosrc/main/resources
:I found this somewhere in a Github project.
The logback.xml file given here solved my problem.