aboutsummaryrefslogtreecommitdiffstats
path: root/crates/client/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--crates/client/src/main.rs (renamed from crates/turtle/src/main.rs)29
1 files changed, 16 insertions, 13 deletions
diff --git a/crates/turtle/src/main.rs b/crates/client/src/main.rs
index 12858140..45f09b1f 100644
--- a/crates/turtle/src/main.rs
+++ b/crates/client/src/main.rs
@@ -4,12 +4,6 @@
clippy::missing_const_for_fn, // not 100% reliable
clippy::redundant_pub_crate,
)]
-#![expect(
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_possible_truncation,
- reason = "We should remove all of these. But it's just a lot of work in this code-base"
-)]
use clap::Parser;
use clap::builder::Styles;
@@ -17,18 +11,12 @@ use clap::builder::styling::{AnsiColor, Effects};
use eyre::Result;
use command::AtuinCmd;
+use tracing_subscriber::EnvFilter;
mod command;
pub(crate) mod atuin_client;
-pub(crate) mod atuin_common;
-pub(crate) mod atuin_daemon;
pub(crate) mod atuin_history;
-pub(crate) mod atuin_pty_proxy;
-pub(crate) mod atuin_server;
-
-mod print_error;
-mod sync;
const VERSION: &str = env!("CARGO_PKG_VERSION");
const SHA: &str = env!("GIT_HASH");
@@ -72,5 +60,20 @@ impl Atuin {
}
fn main() -> Result<()> {
+ if let Err(e) = tracing_subscriber::fmt()
+ .with_file(true)
+ .with_line_number(true)
+ .with_level(true)
+ .without_time()
+ .with_env_filter(
+ EnvFilter::builder()
+ .from_env_lossy()
+ .add_directive("turtle=debug".parse().unwrap()),
+ )
+ .try_init()
+ {
+ eprintln!("failed to initialize logging: {e}");
+ }
+
Atuin::parse().run()
}