[Lift] Re: DB logging logs statements twice?

2009-10-15 Thread Derek Chen-Becker
OK, I found what's happening. Logging is getting called in the private DB.runPreparedStatement, and also in the DB.exec method. Mapper uses exec within the runPreparedStatement call. It seems like exec is the more appropriate place to be running the logging, since you could have multiple execs on

[Lift] Re: DB logging logs statements twice?

2009-10-15 Thread Derek Chen-Becker
Another option that I just thought of would be to add a logged flag on the PreparedStatement wrapper so that it knows not to print a dup. Derek On Thu, Oct 15, 2009 at 8:09 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: OK, I found what's happening. Logging is getting called in the private

[Lift] Re: DB logging logs statements twice?

2009-10-15 Thread Viktor Klang
I vote for DB.exec On Thu, Oct 15, 2009 at 4:09 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: OK, I found what's happening. Logging is getting called in the private DB.runPreparedStatement, and also in the DB.exec method. Mapper uses exec within the runPreparedStatement call. It seems

[Lift] Re: DB logging logs statements twice?

2009-10-15 Thread Derek Chen-Becker
That's +2 to removing the logging from runPreparedStatement? Any other feelings one way or the other? Derek On Thu, Oct 15, 2009 at 8:13 AM, Viktor Klang viktor.kl...@gmail.comwrote: I vote for DB.exec On Thu, Oct 15, 2009 at 4:09 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: OK, I

[Lift] Re: DB logging logs statements twice?

2009-10-14 Thread Derek Chen-Becker
I don't think so. In this case I'm seeing a ResultSet in both log entries, which shouldn't show up in the part where it's being prepared. Derek On Tue, Oct 13, 2009 at 6:09 PM, Jonathan Ferguson j...@spiralarm.comwrote: Is this related to a previous query dated 15 Sept, the title was [Lift]

[Lift] Re: DB logging logs statements twice?

2009-10-13 Thread Derek Chen-Becker
I'm not sure how that could be getting logged twice, especially since it's the exact same ResultSet being returned. When I tested this on my local app (against both PG and MySQL) I didn't get this behavior, but I'll try pulling from master and testing again just in case something changed. Derek

[Lift] Re: DB logging logs statements twice?

2009-10-13 Thread harryh
I'm also seeing this double logging behavior (using PostgreSQL. I was under the impression that it was happening because the SQL statement is first prepared, and then executed (each of which cause a log entry). It's not critical or anything, but it would be nice if this could be fixed at some

[Lift] Re: DB logging logs statements twice?

2009-10-13 Thread Derek Chen-Becker
OK, I'm seeing the same thing here. I'll open an issue and work on it. Derek On Tue, Oct 13, 2009 at 10:07 AM, harryh har...@gmail.com wrote: I'm also seeing this double logging behavior (using PostgreSQL. I was under the impression that it was happening because the SQL statement is first