Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-dev] Make sql logging with bind parameters more readable


We have a question related to sql logging with session.getPlatform().setShouldBindAllParameters(true);

It's logging sql like this.
       bind => [value1, value2]

2 problems here
1) not convenient for troubleshooting/analysis. We can't just take sql from log and execute it against db
2) parameters not enveloped, so if value contains commas - we can't automatically match parameter to value

We considering the following solutions
* Log sql in unprepared style (without ? and bind =>)
* envelop parameters in quotes (also we would like to remove newline before bind, since it simplifies logs processing)

We can work on this and submit PR to eclipselink - what are your thoughts on possible solutions?

Back to the top