Skip to content

Commit

Permalink
integrated trace crate, fixed small bug with max_udp_payload_size val…
Browse files Browse the repository at this point in the history
…idation
  • Loading branch information
ilumary committed Aug 12, 2024
1 parent bc583fd commit 6381265
Show file tree
Hide file tree
Showing 7 changed files with 279 additions and 113 deletions.
134 changes: 134 additions & 0 deletions project/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions project/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ rand = "0.8.5"
ring = "0.17.8"
tokio = { version = "1.37.0", features = ["full"] }
tokio-util = { version = "0.7.11" }
tracing = "0.1.40"
tracing-subscriber = "0.3.18"
15 changes: 14 additions & 1 deletion project/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
use quic::{terror, ServerConfig};

use tracing::Level;
use tracing_subscriber::FmtSubscriber;

fn main() {
let subscriber = FmtSubscriber::builder()
.with_max_level(Level::DEBUG)
.finish();

tracing::subscriber::set_global_default(subscriber).expect("setting default subscriber failed");

let _ = run();
}

#[tokio::main]
async fn main() -> Result<(), terror::Error> {
async fn run() -> Result<(), terror::Error> {
let mut cert_path = std::env::current_dir().unwrap();
cert_path.push("cert");
cert_path.push("cert.der");
Expand Down
Loading

0 comments on commit 6381265

Please sign in to comment.