Timeline for How can I log SQL statements in Spring Boot?
Current License: CC BY-SA 4.0
21 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 18, 2024 at 15:08 | comment | added | Oleksii Kyslytsyn | spring.jpa.showSql=true | |
| Oct 28, 2024 at 12:23 | comment | added | Oleksii Kyslytsyn | it is corresponding to the next one during some migrations stackoverflow.com/questions/77611596/… | |
| Oct 27, 2024 at 8:47 | comment | added | Oleksii Kyslytsyn | It works even through CLI by --spring.. | |
| Feb 27, 2024 at 18:07 | comment | added | Matze | We can even have syntax highlighting via ANSI escape codes: spring.jpa.properties.hibernate.highlight_sql=true | |
| Dec 19, 2022 at 20:37 | comment | added | ErisoHV | This works for me, I'm using spring boot 2.5.9 | |
| May 31, 2022 at 14:37 | history | edited | Peter Mortensen | CC BY-SA 4.0 | Fixed the weird syntax highlighting (as a result, the diff looks more extensive than it really is - use view "Side-by-side Markdown" to compare). |
| May 31, 2022 at 14:24 | history | edited | Peter Mortensen | CC BY-SA 4.0 | Expanded. |
| Oct 26, 2021 at 21:12 | comment | added | payne | What about people that use EclipseLink instead of Hibernate ? | |
| Feb 6, 2020 at 16:00 | comment | added | v.ladynev | @Raj Thank you very much. I have updated the answer. | |
| Feb 6, 2020 at 16:00 | history | edited | v.ladynev | CC BY-SA 4.0 | deleted 5 characters in body |
| Feb 6, 2020 at 1:00 | comment | added | Raj | The "type=trace" is not a spring property, so it does not work. The solution given out below stackoverflow.com/a/41594913/5107365 is the right one for that. | |
| Sep 4, 2018 at 16:54 | comment | added | gstackoverflow | spring.jpa.properties.hibernate.type=trace doesn't affect my log file ;( | |
| Feb 5, 2018 at 21:41 | comment | added | Adeynack | @v.ladynev: But does it shows the parameters' value to you or does it shows question marks? | |
| Feb 2, 2018 at 9:59 | comment | added | v.ladynev | @Adeynack Sorry I can't help you. I just added it according elysch's words. | |
| Feb 2, 2018 at 8:54 | comment | added | Adeynack | I still see only ? instead of the parameters. Was that solution supposed to show them to me? | |
| Jun 29, 2016 at 9:56 | history | edited | v.ladynev | CC BY-SA 3.0 | added 7 characters in body |
| Jun 29, 2016 at 8:34 | comment | added | Muhammad Hewedy | This doesn't write to log file, this writes to STDOUT | |
| Jun 20, 2016 at 5:49 | history | edited | v.ladynev | CC BY-SA 3.0 | added 69 characters in body |
| Jun 11, 2016 at 0:48 | comment | added | elysch | If you want to log values too: spring.jpa.properties.hibernate.type=trace | |
| May 27, 2016 at 13:18 | history | edited | v.ladynev | CC BY-SA 3.0 | added 48 characters in body |
| May 26, 2016 at 15:20 | history | answered | v.ladynev | CC BY-SA 3.0 |