Log executed SQL Statements (LOG4J)

757 views
Skip to first unread message

Oliver Schrenk

unread,
Dec 17, 2012, 8:58:31 AM12/17/12
to jd...@googlegroups.com
Is there a way to enable logging with configuration changes only (such as adding a logger "org.skife.jdbi" to log4j.xml) ? 
Or do I have to make code changes to include h.setSQLLog(new Log4JLog()); ?

Best regards
Oliver Schrenk

Log4j (1.2.17 with xml configuration) over slf4j-log4j12 bridge
jdbi 2.39

Brian McCallister

unread,
Dec 17, 2012, 9:36:16 AM12/17/12
to jd...@googlegroups.com, jd...@googlegroups.com
Right now, you must explicitly set the logger. If you know a better way to avoid adding a hard runtime dependency, aside from commons-logging style probes, I'd be very happy to consider a change!
--
 
 

Oliver Schrenk

unread,
Dec 17, 2012, 11:56:45 AM12/17/12
to jd...@googlegroups.com
I don't know of a better way. As I found no documentation on the issue (I just stumbled over the logging test cases) that I might have missed something. Current solution is fine in my opinion, it was my oversight to not add logging before pushing a release for the application.
> --
>
>

Reply all
Reply to author
Forward
0 new messages