mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 01:58:16 +00:00
add tracing_subscriber and test_log::test
I don't know when and why we dropped log::* in favor of tracing but when it was done, it made relevant logs not appear any more while debugging so... I added test_log::test which helps by automatically adding info logs from trace package.
This commit is contained in:
parent
a7f3579a0a
commit
9a01e32c01
7 changed files with 167 additions and 18 deletions
|
@ -7,6 +7,7 @@ mod opcodes_dictionary;
|
|||
|
||||
use rustyline::{error::ReadlineError, Config, Editor};
|
||||
use std::sync::atomic::Ordering;
|
||||
use tracing_subscriber::{fmt, prelude::*, EnvFilter};
|
||||
|
||||
fn rustyline_config() -> Config {
|
||||
Config::builder()
|
||||
|
@ -15,8 +16,11 @@ fn rustyline_config() -> Config {
|
|||
}
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
env_logger::init();
|
||||
let mut rl = Editor::with_config(rustyline_config())?;
|
||||
tracing_subscriber::registry()
|
||||
.with(fmt::layer())
|
||||
.with(EnvFilter::from_default_env())
|
||||
.init();
|
||||
let mut app = app::Limbo::new(&mut rl)?;
|
||||
let home = dirs::home_dir().expect("Could not determine home directory");
|
||||
let history_file = home.join(".limbo_history");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue