pub struct Logger {
pub target: Arc<Mutex<LogTarget>>,
/* private fields */
}Fields§
§target: Arc<Mutex<LogTarget>>Implementations§
Source§impl Logger
impl Logger
pub fn new(target: Arc<Mutex<LogTarget>>) -> Self
pub fn with_sensitive_values<'a>( &self, values: impl IntoIterator<Item = &'a [u8]>, ) -> Self
pub fn sanitize(&self, message: &str) -> String
pub fn lock(&self) -> LockResult<MutexGuard<'_, LogTarget>>
pub fn silent() -> Self
pub fn terminal() -> Self
pub fn file(file: File) -> Self
pub fn batch(prefix: String, file: File) -> Self
pub fn routed(fallback: Logger, hosts: BTreeMap<String, Logger>) -> Self
pub fn for_host(&self, hostname: &str) -> Self
pub fn event(&self, level: StatusLevel, message: &str)
Sourcepub fn detail(&self, message: &str)
pub fn detail(&self, message: &str)
Record command detail. Single-host terminal runs retain it; batch runs write it only to the host log so concurrent subprocess output cannot overwhelm the interactive fleet summary.
Sourcepub fn elapsed(&self) -> Option<Duration>
pub fn elapsed(&self) -> Option<Duration>
Elapsed time between this host’s first and most recent milestone. Batch callers use this after apply so a fast host is not charged for time spent waiting for another host in the fleet.
pub fn batch_outcome(&self) -> Option<BatchOutcome>
pub fn output_line(&self, line: &str, stderr: bool)
pub fn info(&self, message: &str)
pub fn success(&self, message: &str)
pub fn warn(&self, message: &str)
pub fn error(&self, message: &str)
pub fn failure(&self, message: &str)
pub fn debug(&self, message: &str)
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].