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 sql variables #3314
Log sql variables #3314
Conversation
This pull request has been mentioned on Duplicati. There might be relevant details there: https://forum.duplicati.com/t/unique-constraint-failed-with-sia-support-request-2-0-3-6/3515/13 |
Am I reading that correctly that it will include the SQL parameters in the logs as well? I've kind of been wanting that for a while, but am a bit worried about potential security / auth. leakage in some calls... |
Yes, the logging will include the SQL parameters. However, the local database (which is where the logging code is active) only contains file+block hashes and filenames. Since the filenames are present on the machine, I do not see any security issues with adding this logging. But there is a performance issue here, as the string building is done for each block lookup, even if the user has not activated logging. Due to the way the logging system works, the handler does not know if the the message is going to be used or not. If we include this, we should perhaps add an extra commandline option that enables logging of even the performance critical parts. This would also improve performance overall, becase we would not be calling the log system for messages that we do not want anyway. |
I have added a switch to enable detailed database logging ( |
This pull request has been mentioned on Duplicati. There might be relevant details there: https://forum.duplicati.com/t/what-does-it-mean-to-report-a-duplicate-path/1997/18 |
This pull request has been mentioned on Duplicati. There might be relevant details there: |
This pull request has been mentioned on Duplicati. There might be relevant details there: https://forum.duplicati.com/t/test-command-dont-work-with-version/15362/3 |
All SQL statements are logged to file when Profiling is set.
Profiling is so verbose in other parts, that in SQL worth to have it.
For chasing bugs or understanding whats happening is valuable.