Fork me on GitHub

Hi Datomicists, I'm running some tests that use Datomic (both in-memory, and queries against a persistent backend) and seeing a ton of DEBUG logging statements that clutter the test output. Is there a way to turn off those logging statements? I've tried adding the following code to the test namespace, but it has no effect:

(.setLevel (Logger/getLogger (str *ns*)) Level/WARN)


There should be a logback.xml in the root of your source folder. Here is what I have for mine:


<configuration scan="true">
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <pattern>%d %-5p [%c{2}] %m%n</pattern>

    <logger name="org.eclipse.jetty.server" level="WARN"/>
    <logger name="org.eclipse.jetty.util.log" level="WARN"/>
    <logger name="org.jboss.logging" level="WARN"/>
    <logger name="datomic" level="WARN"/>
    <logger name="io.pedestal" level="ERROR"/>

    <root level="info">
      <appender-ref ref="STDOUT" />


@limist: Datomic uses SLF4J for logging, which forwards to whatever logging framework you want to use, which is controlled by the presence of SLF4J bindings in your project's dependencies. So you need to know what logging framework you have set up in your project, then configure it to reduce the logging level of the datomic.* loggers.


I’m using java.lang.Math/abs in a query, and I get a reflection warning, if I don’t define (defn abs [v] (java.lang.Math/abs v)). Then, my IDE tells me to type-hint v, so it ends up being (defn abs [^double v] (java.lang.Math/abs v)). Is this the way to go? Seems a bit boiler-platey 🙂


(query ends up being something like :where [(my.ns/abs ?v) ?abs-v])


Oh, and just using Math/abs works fine, save for the reflection warning