You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SQLite3 library provides a way of setting an error-logging callback, as described at https://www.sqlite.org/errlog.html but SQLiteCpp doesn't seem to provide a way of setting this callback. As far as I can tell, SQLiteCpp doesn't set this callback internally either.
What is the recommended way, when using SQLiteCpp, of logging the errors that would be sent to this callback? Is setting this callback unnecessary when using SQLiteCpp because any such errors are guaranteed to be thrown as exceptions? Or should I be using the SQLite3 interface directly, calling sqlite3_config as described in the above link, to set this callback?
The text was updated successfully, but these errors were encountered:
Hey @sburton84, this is a great question! Did you decide on how you would use it in the end?
Using this SQLITE_CONFIG_LOG is a great way to help debug any applications.
In fact, it would be awesome to provide explicit support and some examples of how to use it with SQLiteCpp!
Any help on setting up a basic example is appreciated
So far I'm just including sqlite3.h directly and using sqlite3_config(SQLITE_CONFIG_LOG, ...) to set a function-pointer as the callback, I assume this should work but I'm not sure how to force an error to really test it, it doesn't get called at all during normal operation.
It would be good if SQLiteCPP included idiomatic C++ support for this, allowing a std::function<...> of some sort to be used as the callback.
The SQLite3 library provides a way of setting an error-logging callback, as described at https://www.sqlite.org/errlog.html but SQLiteCpp doesn't seem to provide a way of setting this callback. As far as I can tell, SQLiteCpp doesn't set this callback internally either.
What is the recommended way, when using SQLiteCpp, of logging the errors that would be sent to this callback? Is setting this callback unnecessary when using SQLiteCpp because any such errors are guaranteed to be thrown as exceptions? Or should I be using the SQLite3 interface directly, calling
sqlite3_config
as described in the above link, to set this callback?The text was updated successfully, but these errors were encountered: