Open GoogleCodeExporter opened 8 years ago
I'm workin on SQLWatch project
(http://code.google.com/p/sqlwatch/wiki/SQLWatch2_en)
and I'm planning to use log4jdbc to intercept SQL from any generic JDBC Driver.
Here is demo application which uses log4jdbc:
http://code.google.com/p/sqlwatch/source/browse/trunk/sqlwatch2/src/sqlwatch2/de
mo/SQLWatchProxyDemo.java
It uses java standard Logger and Handler to intercep logs, it's ugly
because it will not work is custom application is using another
logger.
My *real* problem is that I can't intercept quereis from log4jdbc directly,
I must deal with slf4j. But slf4j doesn't provide any extention point to:
1. Keep all current project logging architerture as it was before SQLWatch
2. Intercept all logs from custom logger in generic way, independently
to conrteter logger (log4j or java.util.Logger or so).
For my perposes it will be perfect if I will be able to add some
logs listener *lirectly* to log4jdbc. Like I can do with MySQL
JDBC driver - http://code.google.com/p/sqlwatch/wiki/SQLWatch2_en (see
configuation
section)
--
http://code.google.com/p/sqlwatch/source/browse/trunk/sqlwatch2/doc/overview/sql
watch.png
here is SQLWatch tool architecture,
- MySQL solution is on right side, is't easy to configure and use
- log4jdbc solution is on left side, it's too many unnececery layers.
Original comment by dmitry.s...@gmail.com
on 3 Feb 2010 at 1:35
Original comment by arthur.b...@gmail.com
on 2 Mar 2011 at 2:27
I use logback and I need that each servlet use it's own LoggerContext. But
because in
SpyLogFactory:
private static SpyLogDelegator logger;
This is not posible.
It would be better if instad the ability to set SpyLogDelegator there will be
ability to set SpyLogDelegatorSelector.
For example, it's done in logback:
http://logback.qos.ch/apidocs/ch/qos/logback/classic/selector/ContextSelector.ht
ml
So it would be
possible to use different SpyLogDelegator for each thread
Original comment by MatveevA...@gmail.com
on 6 Dec 2012 at 4:42
Issue 58 has been merged into this issue.
Original comment by arthur.b...@gmail.com
on 6 Dec 2012 at 5:46
It's implemented here:
https://code.google.com/p/log4jdbc/issues/detail?id=60#c9
Look at the attached .jar
Original comment by stas...@gmail.com
on 21 Jan 2013 at 6:40
Original issue reported on code.google.com by
mark.m.m...@gmail.com
on 14 Mar 2009 at 5:12Attachments: