mirror of
https://github.com/Noratrieb/haesli.git
synced 2026-01-14 19:55:03 +01:00
connection working
This commit is contained in:
parent
ca1f372665
commit
13deef42fd
9 changed files with 217 additions and 82 deletions
16
src/main.rs
16
src/main.rs
|
|
@ -1,18 +1,28 @@
|
|||
use anyhow::Result;
|
||||
use std::env;
|
||||
use tracing::Level;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
setup_tracing();
|
||||
let mut level = Level::DEBUG;
|
||||
|
||||
for arg in env::args().skip(1) {
|
||||
match arg.as_str() {
|
||||
"--trace" => level = Level::TRACE,
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
setup_tracing(level);
|
||||
amqp_transport::do_thing_i_guess().await
|
||||
}
|
||||
|
||||
fn setup_tracing() {
|
||||
fn setup_tracing(level: Level) {
|
||||
tracing_subscriber::fmt()
|
||||
.with_level(true)
|
||||
.with_timer(tracing_subscriber::fmt::time::time())
|
||||
.with_ansi(true)
|
||||
.with_thread_names(true)
|
||||
.with_max_level(Level::DEBUG)
|
||||
.with_max_level(level)
|
||||
.init()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue