How does P6SPY work? -
How does P6SPY work? -
pretty much in question. discovered p6spy in association hibernate cool see actual sql queries, though i'm quite baffled on how works. how work?
the basic thought on p6spy goes this:
depending if godatasource or jdbc driver in code, instead of referring real ones, specify p6spy specific ones: com.p6spy.engine.spy.p6spydriver or com.p6spy.engine.spy.p6datasource respectively (for total documentation, see: http://p6spy.github.io/p6spy/configandusage.html). afterwards configure real ones in spy.properties file (using realdriver or realdatasource properties respectively) depending on configuration can accomplish logging of sql statements (using com.p6spy.engine.logging.p6logfactory) so reply question, thought jdbc calls (statements execution, transaction related stuff) wrapped (proxied) p6spy , depending on configuration, these can logged via file logger (using appender=com.p6spy.engine.logging.appender.filelogger), stdout logger (using appender=com.p6spy.engine.logging.appender.stdoutlogger) or log4j logger (using: appender=com.p6spy.engine.logging.appender.log4jlogger) if interested in more details, sense free ask, or check project on: https://github.com/p6spy/p6spy
p6spy
Comments
Post a Comment