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

Database query logger proposal #147

Open
soapdog opened this issue Feb 13, 2017 · 1 comment
Open

Database query logger proposal #147

soapdog opened this issue Feb 13, 2017 · 1 comment

Comments

@soapdog
Copy link
Contributor

soapdog commented Feb 13, 2017

Hey Friends,

I was facing a silly SQL syntax error in my project and due to the fact that MySQL error message do not contains the full query used, I ended up coding my own little query logger.

Basically, if the database configuration contains log_database_queries = true, then a file runtime/logs/query.log is populated. So you can have your production code and development code with different logging settings.

This required changing some files at the db folder, and the blank app. Don`t know if this is useful to others so I decided to post here before sending a PR.

https://github.com/soapdog/sailor/tree/b-enhancement-database-query-log

PS: And yes, I was tired and wrote JS inside a Lua file and it took me two commits before I realized that.

@Etiene
Copy link
Member

Etiene commented Feb 13, 2017

I think this would be very useful, if no one is adverse, I would merge it :)
Go ahead and make the PR! :D

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