0

The following is my application.properties:

spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update

logging.level.org.hibernate.SQL=debug
logging.level.org.hibernate.type=trace
logging.level.org.springframework.web=debug
logging.level.org.hibernate.transaction=trace

server.port=8443
server.ssl.enabled=false

but I still get this in the console:

Hibernate: insert into group_user (`member_groups_id`, member_id) values (?, ?)

Why do I still get question mark in the log ?

Arian
  • 7,397
  • 21
  • 89
  • 177
  • The question is why I get ? in the log, although I set the logging levels as it is in the `application.properties` – Arian Jan 10 '18 at 06:45
  • Hibernate uses prepared statements that use `?` placeholders, to know the actual values you probably have to read further in the logs – Arnaud Jan 10 '18 at 06:45
  • can you elaborate what you mean by "read further" – Arian Jan 10 '18 at 06:48
  • 1
    It means if you need values add your own logs. Hibernate dosn't log real values. Imagine they could be just some binary data (e.g. blob). – StanislavL Jan 10 '18 at 06:50
  • How about adding the `logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE` like advised here https://stackoverflow.com/questions/30118683/how-to-log-sql-statements-in-spring-boot – Kayaman Jan 10 '18 at 07:23
  • @Kayaman I tried it, it didn't add anything. – Arian Jan 10 '18 at 07:26
  • Well, the linked question has so many points that obviously it *does* work for many people. Now you just need to go through your configuration and remove any typos or other things you've messed up, unless you can somehow prove that your situation is special. I'm going to close this as a duplicate, because that's what this is. – Kayaman Jan 10 '18 at 07:29

0 Answers0