Quill SQL query logging with values as `?`

1.3k Views Asked by At

I am new to Quill, I want to log the SQL query with values,but at the moment, the values are replaced by ? in the query. My configuration in logback_core_config.xml is

<logger name="io.getquill" level="DEBUG" />

and my query is printing as

SELECT p.name, p.age FROM Person p WHERE p.age IN (?, ?)

I got a solution from Internet that one should set

-Dquill.binds.log=true 

But not sure where to set it . Mine is an SBT project and I set in

javaOptions in Universal ++= Seq(
  "-Dquill.binds.log=true"
 )

I am using

com.typesafe.scalalogging

But it does not work. Could someone please help ?? Thanks in advance .

1

There are 1 best solutions below

0
Andrzej Jozwik On

Try to add to your build.sbt:

def init(): Unit = {
  sys.props.put("quill.macro.log", false.toString)
  sys.props.put("quill.binds.log", true.toString)
}

val fake = init()