mirror of
https://github.com/actix/examples
synced 2025-06-26 17:17:42 +02:00
feat: add tls-hot-reload example
This commit is contained in:
21
examples-common/src/lib.rs
Normal file
21
examples-common/src/lib.rs
Normal file
@ -0,0 +1,21 @@
|
||||
use tracing::level_filters::LevelFilter;
|
||||
use tracing_subscriber::{EnvFilter, prelude::*};
|
||||
|
||||
/// Initializes standard tracing subscriber.
|
||||
pub fn init_standard_logger() {
|
||||
tracing_subscriber::registry()
|
||||
.with(
|
||||
EnvFilter::builder()
|
||||
.with_default_directive(LevelFilter::INFO.into())
|
||||
.from_env_lossy(),
|
||||
)
|
||||
.with(tracing_subscriber::fmt::layer())
|
||||
.init();
|
||||
}
|
||||
|
||||
/// Load default rustls provider, to be done once for the process.
|
||||
pub fn init_rustls_provider() {
|
||||
rustls::crypto::aws_lc_rs::default_provider()
|
||||
.install_default()
|
||||
.unwrap();
|
||||
}
|
Reference in New Issue
Block a user