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 cypher query at debug level #94

Open
jcchen2 opened this issue Feb 27, 2022 · 2 comments
Open

log cypher query at debug level #94

jcchen2 opened this issue Feb 27, 2022 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jcchen2
Copy link

jcchen2 commented Feb 27, 2022

Feature Request:

i'd like to log cypher queries at debug level to better understand what is going on under the hood

Context

this will help me better understand gogm and troubleshoot issues

Alternatives

dig into gogm source code

Would you be interested in implementing this feature?

Yes

@nikitawootten nikitawootten added enhancement New feature or request good first issue Good for newcomers labels Mar 3, 2022
@nikitawootten
Copy link
Contributor

Hi @jcchen2, thanks for submitting an issue (and sending us a follow up email!), it is greatly appreciated. Query logging is definitely something we should think about, and I think it is one of the features that we neglected to reimplement during the transition to v2.

The feature is partially there if you use OpenTelemetry (see https://github.com/mindstand/gogm/blob/a8ccfb6b7c558442d6727d4f2e89e969eb08ea8b/sessionv2.go#L412), but that is probably subject to change.

We welcome any PR implementing the logging if this interests you.

@jcchen2
Copy link
Author

jcchen2 commented Mar 5, 2022

pls see https://github.com/mindstand/gogm/pull/95

i did look into opentelemetry a little bit. not sure it's a good idea to require gogm users to enable opentelemetry to log cypher queries. it is easier for developers to just set the right log level and see queries. just my thoughts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants