pub struct QlogFileFactory { /* private fields */ }Expand description
Enables writing qlog traces to a directory.
Implementations§
Source§impl QlogFileFactory
impl QlogFileFactory
Sourcepub fn new(dir: PathBuf) -> QlogFileFactory
pub fn new(dir: PathBuf) -> QlogFileFactory
Creates a new qlog factory that writes files into the specified directory.
Sourcepub fn from_env() -> QlogFileFactory
pub fn from_env() -> QlogFileFactory
Creates a new qlog factory that writes files into QLOGDIR, if set.
If the environment variable QLOGDIR is set, qlog traces for all connections handled
by this endpoint will be written into that directory.
If the directory doesn’t exist it will be created.
Sourcepub fn with_prefix(self, prefix: impl ToString) -> QlogFileFactory
pub fn with_prefix(self, prefix: impl ToString) -> QlogFileFactory
Sets a prefix to the filename of the generated files.
Sourcepub fn with_start_instant(self, start: Instant) -> QlogFileFactory
pub fn with_start_instant(self, start: Instant) -> QlogFileFactory
Override the instant relative to which all events are recorded.
If not set, events will be recorded relative to the start of the connection.
Trait Implementations§
Source§impl Debug for QlogFileFactory
impl Debug for QlogFileFactory
Source§impl QlogFactory for QlogFileFactory
impl QlogFactory for QlogFileFactory
Source§fn for_connection(
&self,
side: Side,
_remote: SocketAddr,
initial_dst_cid: ConnectionId,
now: Instant,
) -> Option<QlogConfig>
fn for_connection( &self, side: Side, _remote: SocketAddr, initial_dst_cid: ConnectionId, now: Instant, ) -> Option<QlogConfig>
Returns a
QlogConfig for a connection, if logging should be enabled. Read moreAuto Trait Implementations§
impl Freeze for QlogFileFactory
impl RefUnwindSafe for QlogFileFactory
impl Send for QlogFileFactory
impl Sync for QlogFileFactory
impl Unpin for QlogFileFactory
impl UnwindSafe for QlogFileFactory
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more