server-beta
server-beta copied to clipboard
[BUG]: Sqlite logging no output
Description
Setting both logging.log_sqlite
and logging.log_sqlite_queries
to true
in config.json
won't log any query in runtime.
Legacy server.cfg db_logging 1
and db_log_queries 1
won't work either.
How to re-produce this bug
- Generate default config.json
- Set both
logging.log_sqlite
andlogging.log_sqlite_queries
totrue
- Generate an empty sqlite database named
my-db.db
and place it inscriptfiles/
- Compile the code below and run it
#include <a_samp>
#define db_query_and_free(%0) db_free_result(db_query(g_DBHandle, %0))
main() {}
public OnGameModeInit()
{
new DB: g_DBHandle = db_open("my-db.db");
printf("g_DBHandle %d", _:g_DBHandle);
db_query_and_free("SELECT 'Hello world 1'");
db_free_result(db_query(g_DBHandle, "SELECT 'Hello world 3'"));
}
Relevant log output
open.mp logs
[Info] g_DBHandle 1
sa-mp logs
g_DBHandle 1
[db_log_queries]: SELECT 'Hello world 1'
[db_log_queries]: SELECT 'Hello world 3'
open.mp server version
beta 10
Operating system or distribution
up to date Windows 10
Contact information
discord: Zantetsuken#2220