Switch logging to use tracing instead of log
Tracing has support for intervals and a great os_log integration.
This commit is contained in:
parent
60cfd95789
commit
e643d9dd41
14 changed files with 297 additions and 8 deletions
|
|
@ -5,15 +5,18 @@ use std::{
|
|||
mem::MaybeUninit,
|
||||
os::unix::io::{AsRawFd, IntoRawFd, RawFd},
|
||||
};
|
||||
use tracing::instrument;
|
||||
|
||||
use crate::TunInterface;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct TunQueue {
|
||||
socket: socket2::Socket,
|
||||
}
|
||||
|
||||
impl TunQueue {
|
||||
#[throws]
|
||||
#[instrument]
|
||||
pub fn recv(&self, buf: &mut [MaybeUninit<u8>]) -> usize {
|
||||
self.socket.recv(buf)?
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue