Skip to content

[BUG]: Sqlite logging no output #589

Closed

Description

@ZantetsukenGT

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

  1. Generate default config.json
  2. Set both logging.log_sqlite and logging.log_sqlite_queries to true
  3. Generate an empty sqlite database named my-db.db and place it in scriptfiles/
  4. 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

Activity

  1. added
    bug
    on Dec 3, 2022
  2. self-assigned this
    on Dec 13, 2022
  3. removed their assignment
    on Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions