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

log query #95

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

log query #95

wants to merge 4 commits into from

Conversation

jcchen2
Copy link

@jcchen2 jcchen2 commented Mar 5, 2022

Committer Notes

log cypher query and parameters at debug level

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have included new tests that address the changes

@nikitawootten
Copy link
Contributor

Hello @jcchen2, thanks for your contributions! I think this is looking good! However I do have a few comments:

  • if possible I think query logging and ESPECIALLY parameter logging should be toggleable via a setting in the gogm config (that should probably default to off). Parameter logging can lead to nasty vulnerabilities if someone gets access to your logs.
  • instead of logging the cypher parameters at each point, injecting that functionality into a session's runReadOnly and runWrite methods would be a bit more elegant and future proof. @erictg any ideas on how to extract the cypher parameters from the runWrite method?

@jcchen2
Copy link
Author

jcchen2 commented Mar 12, 2022

@nikitawootten i created logging wrappers around neo4j's session and transaction. it should be future-proof. i also updated logging to conditionally log parameters. pls let me know what you think.

@nikitawootten nikitawootten requested a review from erictg January 12, 2023 03:12
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