diff --git a/Cargo.toml b/Cargo.toml index 01d8810..4738891 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tokio-graceful-shutdown" authors = ["Finomnis "] -version = "0.15.1" +version = "0.15.2" edition = "2021" rust-version = "1.70" license = "MIT OR Apache-2.0" @@ -41,7 +41,7 @@ tokio = { version = "1.32.0", default-features = false, features = [ tokio-util = { version = "0.7.10", default-features = false } pin-project-lite = "0.2.13" -thiserror = "1.0.49" +thiserror = "2.0.3" miette = "7.0.0" async-trait = "0.1.73" atomic = "0.6.0" diff --git a/examples/01_normal_shutdown.rs b/examples/01_normal_shutdown.rs index 7d717df..bcddb95 100644 --- a/examples/01_normal_shutdown.rs +++ b/examples/01_normal_shutdown.rs @@ -33,7 +33,7 @@ async fn subsys2(subsys: SubsystemHandle) -> Result<()> { async fn main() -> Result<()> { // Init logging tracing_subscriber::fmt() - .with_max_level(tracing::Level::TRACE) + .with_max_level(tracing::Level::DEBUG) .init(); // Setup and execute subsystem tree diff --git a/examples/02_structs.rs b/examples/02_structs.rs index 089da5d..5192318 100644 --- a/examples/02_structs.rs +++ b/examples/02_structs.rs @@ -46,7 +46,7 @@ impl IntoSubsystem for Subsystem2 { async fn main() -> Result<()> { // Init logging tracing_subscriber::fmt() - .with_max_level(tracing::Level::TRACE) + .with_max_level(tracing::Level::DEBUG) .init(); let subsys1 = Subsystem1 { arg: 42 }; diff --git a/examples/03_shutdown_timeout.rs b/examples/03_shutdown_timeout.rs index 5063d28..652b318 100644 --- a/examples/03_shutdown_timeout.rs +++ b/examples/03_shutdown_timeout.rs @@ -21,7 +21,7 @@ async fn subsys1(subsys: SubsystemHandle) -> Result<()> { async fn main() -> Result<()> { // Init logging tracing_subscriber::fmt() - .with_max_level(tracing::Level::TRACE) + .with_max_level(tracing::Level::DEBUG) .init(); // Setup and execute subsystem tree diff --git a/examples/04_subsystem_finished.rs b/examples/04_subsystem_finished.rs index 7c09c96..2916552 100644 --- a/examples/04_subsystem_finished.rs +++ b/examples/04_subsystem_finished.rs @@ -28,7 +28,7 @@ async fn subsys2(subsys: SubsystemHandle) -> Result<()> { async fn main() -> Result<()> { // Init logging tracing_subscriber::fmt() - .with_max_level(tracing::Level::TRACE) + .with_max_level(tracing::Level::DEBUG) .init(); // Setup and execute subsystem tree diff --git a/examples/05_subsystem_finished_with_error.rs b/examples/05_subsystem_finished_with_error.rs index c6f3009..ca8b222 100644 --- a/examples/05_subsystem_finished_with_error.rs +++ b/examples/05_subsystem_finished_with_error.rs @@ -28,7 +28,7 @@ async fn subsys2(subsys: SubsystemHandle) -> Result<()> { async fn main() -> Result<()> { // Init logging tracing_subscriber::fmt() - .with_max_level(tracing::Level::TRACE) + .with_max_level(tracing::Level::DEBUG) .init(); // Setup and execute subsystem tree diff --git a/examples/06_nested_subsystems.rs b/examples/06_nested_subsystems.rs index 795e0e8..a2f7642 100644 --- a/examples/06_nested_subsystems.rs +++ b/examples/06_nested_subsystems.rs @@ -28,7 +28,7 @@ async fn subsys2(subsys: SubsystemHandle) -> Result<()> { async fn main() -> Result<()> { // Init logging tracing_subscriber::fmt() - .with_max_level(tracing::Level::TRACE) + .with_max_level(tracing::Level::DEBUG) .init(); // Setup and execute subsystem tree diff --git a/examples/07_nested_error.rs b/examples/07_nested_error.rs index ff0c711..bf2a3d5 100644 --- a/examples/07_nested_error.rs +++ b/examples/07_nested_error.rs @@ -27,7 +27,7 @@ async fn subsys2(_subsys: SubsystemHandle) -> Result<()> { async fn main() -> Result<()> { // Init logging tracing_subscriber::fmt() - .with_max_level(tracing::Level::TRACE) + .with_max_level(tracing::Level::DEBUG) .init(); // Setup and execute subsystem tree diff --git a/examples/08_panic_handling.rs b/examples/08_panic_handling.rs index d690ac0..57f3610 100644 --- a/examples/08_panic_handling.rs +++ b/examples/08_panic_handling.rs @@ -29,7 +29,7 @@ async fn subsys2(_subsys: SubsystemHandle) -> Result<()> { async fn main() -> Result<()> { // Init logging tracing_subscriber::fmt() - .with_max_level(tracing::Level::TRACE) + .with_max_level(tracing::Level::DEBUG) .init(); // Setup and execute subsystem tree diff --git a/examples/09_task_cancellation.rs b/examples/09_task_cancellation.rs index b7ac464..4a9c074 100644 --- a/examples/09_task_cancellation.rs +++ b/examples/09_task_cancellation.rs @@ -47,7 +47,7 @@ impl CountdownSubsystem { async fn main() -> Result<()> { // Init logging tracing_subscriber::fmt() - .with_max_level(tracing::Level::TRACE) + .with_max_level(tracing::Level::DEBUG) .init(); // Setup and execute subsystem tree diff --git a/examples/10_request_shutdown.rs b/examples/10_request_shutdown.rs index 6aceaa5..729c3e0 100644 --- a/examples/10_request_shutdown.rs +++ b/examples/10_request_shutdown.rs @@ -34,7 +34,7 @@ impl CountdownSubsystem { async fn main() -> Result<()> { // Init logging tracing_subscriber::fmt() - .with_max_level(tracing::Level::TRACE) + .with_max_level(tracing::Level::DEBUG) .init(); // Setup and execute subsystem tree diff --git a/examples/11_double_panic.rs b/examples/11_double_panic.rs index a38bc4e..b979c6a 100644 --- a/examples/11_double_panic.rs +++ b/examples/11_double_panic.rs @@ -41,7 +41,7 @@ async fn subsys3(subsys: SubsystemHandle) -> Result<()> { async fn main() -> Result<()> { // Init logging tracing_subscriber::fmt() - .with_max_level(tracing::Level::TRACE) + .with_max_level(tracing::Level::DEBUG) .init(); // Setup and execute subsystem tree diff --git a/examples/12_subsystem_auto_restart.rs b/examples/12_subsystem_auto_restart.rs index f4369cf..931304c 100644 --- a/examples/12_subsystem_auto_restart.rs +++ b/examples/12_subsystem_auto_restart.rs @@ -48,7 +48,7 @@ async fn subsys1_keepalive(subsys: SubsystemHandle) -> Result<()> { async fn main() -> Result<()> { // Init logging tracing_subscriber::fmt() - .with_max_level(tracing::Level::TRACE) + .with_max_level(tracing::Level::DEBUG) .init(); // Setup and execute subsystem tree diff --git a/examples/13_partial_shutdown.rs b/examples/13_partial_shutdown.rs index 8f92b0d..533edc4 100644 --- a/examples/13_partial_shutdown.rs +++ b/examples/13_partial_shutdown.rs @@ -54,7 +54,7 @@ async fn subsys1(subsys: SubsystemHandle) -> Result<()> { async fn main() -> Result<()> { // Init logging tracing_subscriber::fmt() - .with_max_level(tracing::Level::TRACE) + .with_max_level(tracing::Level::DEBUG) .init(); // Setup and execute subsystem tree diff --git a/examples/14_partial_shutdown_error.rs b/examples/14_partial_shutdown_error.rs index 93a36d1..ee06025 100644 --- a/examples/14_partial_shutdown_error.rs +++ b/examples/14_partial_shutdown_error.rs @@ -56,7 +56,7 @@ async fn subsys1(subsys: SubsystemHandle) -> Result<()> { async fn main() -> Result<()> { // Init logging tracing_subscriber::fmt() - .with_max_level(tracing::Level::TRACE) + .with_max_level(tracing::Level::DEBUG) .init(); // Setup and execute subsystem tree diff --git a/examples/15_without_miette.rs b/examples/15_without_miette.rs index 330ff9c..9f87383 100644 --- a/examples/15_without_miette.rs +++ b/examples/15_without_miette.rs @@ -29,7 +29,7 @@ async fn subsys1(_subsys: SubsystemHandle) -> Result<(), MyError> { async fn main() -> Result<(), Box> { // Init logging tracing_subscriber::fmt() - .with_max_level(tracing::Level::TRACE) + .with_max_level(tracing::Level::DEBUG) .init(); // Setup and execute subsystem tree diff --git a/examples/16_with_anyhow.rs b/examples/16_with_anyhow.rs index 74e9370..c044044 100644 --- a/examples/16_with_anyhow.rs +++ b/examples/16_with_anyhow.rs @@ -17,7 +17,7 @@ async fn subsys1(_subsys: SubsystemHandle) -> Result<()> { async fn main() -> Result<()> { // Init logging tracing_subscriber::fmt() - .with_max_level(tracing::Level::TRACE) + .with_max_level(tracing::Level::DEBUG) .init(); // Setup and execute subsystem tree diff --git a/examples/17_with_eyre.rs b/examples/17_with_eyre.rs index 148a22b..b69d609 100644 --- a/examples/17_with_eyre.rs +++ b/examples/17_with_eyre.rs @@ -17,7 +17,7 @@ async fn subsys1(_subsys: SubsystemHandle) -> Result<()> { async fn main() -> Result<()> { // Init logging tracing_subscriber::fmt() - .with_max_level(tracing::Level::TRACE) + .with_max_level(tracing::Level::DEBUG) .init(); // Setup and execute subsystem tree diff --git a/examples/18_error_type_passthrough.rs b/examples/18_error_type_passthrough.rs index 4b18c4e..5dfb56e 100644 --- a/examples/18_error_type_passthrough.rs +++ b/examples/18_error_type_passthrough.rs @@ -80,7 +80,7 @@ impl IntoSubsystem for Subsys6 { async fn main() -> Result<(), miette::Report> { // Init logging tracing_subscriber::fmt() - .with_max_level(tracing::Level::TRACE) + .with_max_level(tracing::Level::DEBUG) .init(); // Setup and execute subsystem tree diff --git a/examples/19_sequential_shutdown.rs b/examples/19_sequential_shutdown.rs index 5d8c248..b7a8e0f 100644 --- a/examples/19_sequential_shutdown.rs +++ b/examples/19_sequential_shutdown.rs @@ -111,7 +111,7 @@ async fn root(subsys: SubsystemHandle) -> Result<()> { async fn main() -> Result<()> { // Init logging tracing_subscriber::fmt() - .with_max_level(tracing::Level::TRACE) + .with_max_level(tracing::Level::DEBUG) .init(); // Setup and execute subsystem tree diff --git a/examples/20_orchestrated_shutdown_order.rs b/examples/20_orchestrated_shutdown_order.rs index 7873b35..939a428 100644 --- a/examples/20_orchestrated_shutdown_order.rs +++ b/examples/20_orchestrated_shutdown_order.rs @@ -69,7 +69,7 @@ async fn parent(subsys: SubsystemHandle) -> Result<()> { async fn main() -> Result<()> { // Init logging tracing_subscriber::fmt() - .with_max_level(tracing::Level::TRACE) + .with_max_level(tracing::Level::DEBUG) .init(); // Setup and execute subsystem tree diff --git a/examples/hyper.rs b/examples/hyper.rs index d6b7b5e..49fa023 100644 --- a/examples/hyper.rs +++ b/examples/hyper.rs @@ -113,7 +113,7 @@ async fn hyper_subsystem(subsys: SubsystemHandle) -> Result<()> { async fn main() -> Result<()> { // Init logging tracing_subscriber::fmt() - .with_max_level(tracing::Level::TRACE) + .with_max_level(tracing::Level::DEBUG) .init(); // Setup and execute subsystem tree diff --git a/examples/warp.rs b/examples/warp.rs index 96f36df..23686f3 100644 --- a/examples/warp.rs +++ b/examples/warp.rs @@ -32,7 +32,7 @@ async fn warp_subsystem(subsys: SubsystemHandle) -> Result<()> { async fn main() -> Result<()> { // Init logging tracing_subscriber::fmt() - .with_max_level(tracing::Level::TRACE) + .with_max_level(tracing::Level::DEBUG) .init(); // Setup and execute subsystem tree