-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
The logging output from libsql-c/src/lib.rs is very noisy. For example with this test program:
require 'libsql'
db = Libsql::Database.new
db.connect do |conn|
conn.execute_batch <<-SQL
CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT);
INSERT INTO users (name) VALUES ('Iku');
SQL
rows = conn.query 'SELECT * FROM users'
p rows.to_a.size
rows.close
endI'm getting all this output:
[src/lib.rs:281:9] (path, url, auth_token, encryption_key) = (
None,
None,
None,
None,
)
[src/lib.rs:628:9] sql = "SELECT * FROM users"
[src/lib.rs:733:43] rows = Rows
Would it be possible to make the logging configurable, either per database instance or globally? Something like this:
Libsql::Database.new(logger: true)
Libsql::Database.new(tracing_level: Libsql::TRACING_LEVEL_INFO)
Libsql.logger = true
Libsql.tracing_level = Libsql::TRACING_LEVEL_INFOAnd in either case use a lower default tracing level (error or warn) so that it's not as noisy by default?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels