refactor database engine/options; add column descriptors

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-01-06 14:07:26 +00:00
parent 02f19cf951
commit 6a0f9add0c
21 changed files with 1358 additions and 965 deletions

View File

@@ -0,0 +1,22 @@
use conduwuit::{debug, error, warn};
use rocksdb::LogLevel;
#[tracing::instrument(
parent = None,
name = "rocksdb",
level = "trace"
skip(msg),
)]
pub(crate) fn handle(level: LogLevel, msg: &str) {
let msg = msg.trim();
if msg.starts_with("Options") {
return;
}
match level {
| LogLevel::Header | LogLevel::Debug => debug!("{msg}"),
| LogLevel::Error | LogLevel::Fatal => error!("{msg}"),
| LogLevel::Info => debug!("{msg}"),
| LogLevel::Warn => warn!("{msg}"),
};
}