Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Enabling SQL logging

12 views
Skip to first unread message

Prashanth Acharya

unread,
Jun 14, 2023, 9:04:41 AM6/14/23
to ScalikeJDBC Users Group
Hi team

I am looking to enable SQL logging to figure out a nagging persistent issue. 

Here are my dependencies -

  "org.scalikejdbc" %% "scalikejdbc" % "3.5.0",
  "org.mariadb.jdbc" % "mariadb-java-client" % "2.7.2",

Here is the code snippet for logging sql

def dbInit(): Unit = {
    GlobalSettings.loggingSQLAndTime = LoggingSQLAndTimeSettings(
      enabled = true,
      singleLineMode = false,
      printUnprocessedStackTrace = false,
      stackTraceDepth= 15,
      logLevel = 'info,
      warningEnabled = false,
      warningThresholdMillis = 3000L,
      warningLogLevel = 'warn
    )
    super.init()
  }
  def start(): Unit = dbInit()

This is an akka-http app and start() is called in the bootstrap

No matter what I do, im not seeing the SQL logs.

Thanks in advance for your help

what am i missing?

Thanks

Prashanth
Reply all
Reply to author
Forward
0 new messages