gogm
gogm copied to clipboard
log cypher query at debug level
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
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.
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.