question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Logged SQL Statements are not visible in dev ui log.

See original GitHub issue

Describe the bug

I activated quarkus.hibernate-orm.log.sql=true. The sql statements are logged to the console, but not visible in dev ui.

Expected behavior

The log in dev ui also prints out the executed sql statements.

Actual behavior

No sql statements are logged in dev ui. Parameters for the statements are logged however.

How to Reproduce?

  1. Download the reproducer: self-invocation.zip

  2. mvn quarkus:dev, open dev ui

  3. http://localhost:8080/hello

  4. The terminal now prints out some sql statements.

  5. They are not visible in dev ui however

Output of uname -a or ver

MSYS_NT-10.0-19043 NANB7NLNVP2 3.1.7-340.x86_64 2021-03-26 22:17 UTC x86_64 Msys

Output of java -version

OpenJDK Runtime Environment Zulu11.39+15-CA (build 11.0.7+10-LTS) OpenJDK 64-Bit Server VM Zulu11.39+15-CA (build 11.0.7+10-LTS, mixed mode)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.3.0.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739) Maven home: C:\eclipse\tools\apache-maven Java version: 11.0.7, vendor: Azul Systems, Inc., runtime: C:\eclipse\tools\java\11 Default locale: de_DE, platform encoding: Cp1252 OS name: “windows 10”, version: “10.0”, arch: “amd64”, family: “windows”

Additional information

No response

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
phillip-krugercommented, Oct 7, 2021

Thanks ! Waiting for their answer. I am not sure how to get System.out in the log…

0reactions
gsmetcommented, Jan 5, 2022

FWIW it has always bugged me that the SQL output was sent to stdout and I would have preferred a logger.

If enabling DEBUG for org.hibernate.SQL has the same behavior as the current setting, I would lean towards switching to it in Quarkus given it’s a relatively new project and I don’t think people would rely on it (and in any case, they can tweak the logger to have the equivalent behavior).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Where to see the logged sql statements in play2?
1. application.conf. make sure: db.default.logStatements=true. This config is actually a setting of bonecp which is connection pool used in play2 ...
Read more >
Set Up Debug Logging - Salesforce Help
To activate debug logging for users, Apex classes, and Apex triggers, configure trace flags and debug levels in the Developer Console or in...
Read more >
Enabling continuous logging for AWS Glue jobs
You can enable continuous logging using the AWS Glue console or through the AWS Command Line Interface (AWS CLI). You can enable continuous...
Read more >
Logging - Django documentation
A logger is configured to have a log level. This log level describes the severity of the messages that the logger will handle....
Read more >
SQL Developer - Oracle
Oracle SQL Developer is a free, development environment that simplifies the ... PL/SQL applications, query tools, a DBA console, a reports interface, and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found