pub struct Logger { /* private fields */ }Expand description
Runtime logger for debug and SSH session output.
Implementations§
Source§impl Logger
impl Logger
Sourcepub fn enable_debug(&self)
pub fn enable_debug(&self)
Enable safe debug logging.
Sourcepub fn enable_debug_with_verbosity(&self, verbosity: DebugVerbosity)
pub fn enable_debug_with_verbosity(&self, verbosity: DebugVerbosity)
Enable debug logging with explicit verbosity.
Sourcepub fn disable_debug(&self)
pub fn disable_debug(&self)
Disable debug logging and flush pending messages.
Sourcepub fn enable_ssh_logging(&self)
pub fn enable_ssh_logging(&self)
Enable SSH session logging.
Sourcepub fn disable_ssh_logging(&self)
pub fn disable_ssh_logging(&self)
Disable SSH session logging.
Sourcepub fn debug_verbosity(&self) -> DebugVerbosity
pub fn debug_verbosity(&self) -> DebugVerbosity
Return currently configured debug verbosity.
Sourcepub fn is_debug_enabled(&self) -> bool
pub fn is_debug_enabled(&self) -> bool
Returns true when safe or raw debug is enabled.
Sourcepub fn is_raw_debug_enabled(&self) -> bool
pub fn is_raw_debug_enabled(&self) -> bool
Returns true only when raw debug logging is enabled.
Sourcepub fn is_ssh_logging_enabled(&self) -> bool
pub fn is_ssh_logging_enabled(&self) -> bool
Returns true when SSH session logging is enabled.
Sourcepub fn log_debug(&self, message: &str) -> Result<(), LogError>
pub fn log_debug(&self, message: &str) -> Result<(), LogError>
Write a debug-level message if debug logging is enabled.
Sourcepub fn log_info(&self, message: &str) -> Result<(), LogError>
pub fn log_info(&self, message: &str) -> Result<(), LogError>
Write an info-level message if debug logging is enabled.
Sourcepub fn log_warn(&self, message: &str) -> Result<(), LogError>
pub fn log_warn(&self, message: &str) -> Result<(), LogError>
Write a warning-level message if debug logging is enabled.
Sourcepub fn log_error(&self, message: &str) -> Result<(), LogError>
pub fn log_error(&self, message: &str) -> Result<(), LogError>
Write an error-level message if debug logging is enabled.
Sourcepub fn flush_debug(&self) -> Result<(), LogError>
pub fn flush_debug(&self) -> Result<(), LogError>
Flush debug logger output.
Sourcepub fn log_ssh(&self, message: &str) -> Result<(), LogError>
pub fn log_ssh(&self, message: &str) -> Result<(), LogError>
Write one sanitized SSH session log line when enabled.
Sourcepub fn log_ssh_raw(&self, message: &str) -> Result<(), LogError>
pub fn log_ssh_raw(&self, message: &str) -> Result<(), LogError>
Write one raw SSH chunk when enabled.
Write one shared raw SSH chunk without cloning the string.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Logger
impl RefUnwindSafe for Logger
impl Send for Logger
impl Sync for Logger
impl Unpin for Logger
impl UnsafeUnpin for Logger
impl UnwindSafe for Logger
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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>
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>
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