refactor: 使用 tracing 输出日志 (#1856)

* change all println to tracing
This commit is contained in:
Luna Yao
2026-03-04 02:52:23 +01:00
committed by GitHub
parent 1d25240d8c
commit 5f31583a84
18 changed files with 488 additions and 384 deletions
+5 -2
View File
@@ -1,6 +1,9 @@
use std::sync::Arc;
use crate::{common::config::EncryptionAlgorithm, tunnel::packet_def::ZCPacket};
use crate::{
common::{config::EncryptionAlgorithm, log},
tunnel::packet_def::ZCPacket,
};
#[cfg(feature = "wireguard")]
pub mod ring_aes_gcm;
@@ -66,7 +69,7 @@ pub fn create_encryptor(
let algorithm = match EncryptionAlgorithm::try_from(algorithm) {
Ok(algorithm) => algorithm,
Err(_) => {
eprintln!(
log::warn!(
"Unknown encryption algorithm: {}, falling back to default AES-GCM",
algorithm
);