Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable monitoring with markers and original query #92

Closed
wants to merge 20 commits into from

Conversation

slavik57
Copy link

@slavik57 slavik57 commented Nov 21, 2017

Added 2 configurations:
log4jdbc.sqltiming.usemarkersfortimingreports - when set to true uses markers to log the timing of the queries. Default value is false.
log4jdbc.dump.sql.reportoriginal - when set to true, keeps the original sql query without replacing the ? signs

Also added a static property Slf4jSpyLogDelegator.markerFactory to enable for custom marker creations for plugins such as logstash-logback-encoder that have their own marker objects.

Also added a static property DriverSpy.sqlPrettifier to enable changing the query that will be printed to the log. The default is to return the same query. It is useful if you want to hide some information like password hashes or replace in (?, ?, ? ... ?) with in (?)

This PR should close the issue #91

@slavik57 slavik57 closed this Mar 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants