pub struct ServerLogger { /* private fields */ }Expand description
Server logger.
Implementations§
Source§impl ServerLogger
impl ServerLogger
Sourcepub fn profile_level(&self) -> Option<ProfileLevel>
pub fn profile_level(&self) -> Option<ProfileLevel>
Returns the profile level, none if profiling is deactivated.
Sourcepub fn compilation_activated(&self) -> bool
pub fn compilation_activated(&self) -> bool
Returns true if compilation info should be logged.
Sourcepub fn compilation_source_activated(&self) -> bool
pub fn compilation_source_activated(&self) -> bool
Returns true if compilation logging includes kernel sources
(CompilationLogLevel::Full) — the only level where attaching debug
info and formatting the source pays off. Basic prints a name-only
line, so runtimes must not spend a clang-format subprocess per fresh
kernel on it.
Sourcepub fn log_compilation<I>(&self, arg: &I)where
I: Display,
pub fn log_compilation<I>(&self, arg: &I)where
I: Display,
Log the argument to a file when the compilation logger is activated.
Sourcepub fn log_streaming<I: FnOnce() -> String, C: FnOnce(StreamingLogLevel) -> bool>(
&self,
cond: C,
format: I,
)
pub fn log_streaming<I: FnOnce() -> String, C: FnOnce(StreamingLogLevel) -> bool>( &self, cond: C, format: I, )
Log the argument to the logger when the streaming logger is activated.
Sourcepub fn log_memory<I: FnOnce() -> String, C: FnOnce(MemoryLogLevel) -> bool>(
&self,
cond: C,
format: I,
)
pub fn log_memory<I: FnOnce() -> String, C: FnOnce(MemoryLogLevel) -> bool>( &self, cond: C, format: I, )
Log the argument to the logger when the memory logger is activated.
Sourcepub fn register_execution(&self, name: impl Display)
pub fn register_execution(&self, name: impl Display)
Register a profiled task without timing.
Sourcepub fn register_profiled(&self, name: impl Display, duration: ProfileDuration)
pub fn register_profiled(&self, name: impl Display, duration: ProfileDuration)
Register a profiled task.
Sourcepub fn profile_summary(&self)
pub fn profile_summary(&self)
Show the profiling summary if activated and reset its state.
Trait Implementations§
Source§impl Debug for ServerLogger
impl Debug for ServerLogger
Auto Trait Implementations§
impl Freeze for ServerLogger
impl RefUnwindSafe for ServerLogger
impl Send for ServerLogger
impl Sync for ServerLogger
impl Unpin for ServerLogger
impl UnsafeUnpin for ServerLogger
impl UnwindSafe for ServerLogger
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more