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

add the ability to log commands and queries #148

Open
bazo opened this issue Jun 15, 2014 · 6 comments
Open

add the ability to log commands and queries #148

bazo opened this issue Jun 15, 2014 · 6 comments

Comments

@bazo
Copy link

bazo commented Jun 15, 2014

hi, i would like to log my queries together with the execution time and results count. i can't find any place in the code i could hook into.

would it be possible to add some logging or event system?

@bazo
Copy link
Author

bazo commented Aug 29, 2014

any thoughts on this?

@jadell
Copy link
Owner

jadell commented Aug 29, 2014

This is a good idea, and one I was planning for when I rewrite neo4jphp with a Guzzle backend (it natively supports logging like this.) I honestly haven't had a lot of time to work on neo4jphp recently, so I won't be building it any time soon. If you'd like to take a shot at it and send a pull request, I'll review it.

@bazo
Copy link
Author

bazo commented Aug 30, 2014

guzzle logs requests, i was thinking more about logging cypher queries to display in a debug panel. what i had in mind was adding some kind of event dispatcher.

i don't know if i can pull off a rewrite of whole neo4jphp to use guzzle :) do you want to make it the only transport or add it as a new one?

@jadell
Copy link
Owner

jadell commented Aug 30, 2014

Sorry, I wasn't saying you should rewrite all of neo4jphp. I was suggesting that you figure out how to hook an event system into the existing code to get what you want.

@bazo
Copy link
Author

bazo commented Aug 30, 2014

ok :) we got two options: use symphony event dispatcher or doctrine event manager. which one do you prefer?

@jadell
Copy link
Owner

jadell commented Aug 30, 2014

I prefer https://github.com/igorw/evenement
I has no external dependencies, and is simple and easy to work with.

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

No branches or pull requests

2 participants