Switch logging to use tracing instead of log

Tracing has support for intervals and a great os_log integration.
This commit is contained in:
Jett Chen 2023-08-27 11:43:17 +08:00
parent 60cfd95789
commit e643d9dd41
14 changed files with 297 additions and 8 deletions

View file

@ -1,3 +1,4 @@
use std::fmt::Debug;
use fehler::throws;
use std::io::Error;
use std::ptr;
@ -14,6 +15,15 @@ pub struct TunInterface {
name: String,
}
impl Debug for TunInterface {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("TunInterface")
.field("handle", &"SYS_WINTUN_ADAPTER_HANDLE".to_string())
.field("name", &self.name)
.finish()
}
}
impl TunInterface {
#[throws]
pub fn new() -> TunInterface {