pub struct XbpLogger { /* private fields */ }Implementations§
Source§impl XbpLogger
impl XbpLogger
pub async fn new(debug: bool) -> Result<Self, String>
pub async fn determine_and_ensure_log_directory() -> Result<PathBuf, String>
Sourcepub async fn log_info(
&self,
command: &str,
message: &str,
details: Option<&str>,
) -> Result<(), String>
pub async fn log_info( &self, command: &str, message: &str, details: Option<&str>, ) -> Result<(), String>
Log an info message
Sourcepub async fn log_warning(
&self,
command: &str,
message: &str,
details: Option<&str>,
) -> Result<(), String>
pub async fn log_warning( &self, command: &str, message: &str, details: Option<&str>, ) -> Result<(), String>
Log a warning message
Sourcepub async fn log_error(
&self,
command: &str,
message: &str,
details: Option<&str>,
) -> Result<(), String>
pub async fn log_error( &self, command: &str, message: &str, details: Option<&str>, ) -> Result<(), String>
Log an error message
Sourcepub async fn log_success(
&self,
command: &str,
message: &str,
details: Option<&str>,
) -> Result<(), String>
pub async fn log_success( &self, command: &str, message: &str, details: Option<&str>, ) -> Result<(), String>
Log a success message
Sourcepub async fn log_debug(
&self,
command: &str,
message: &str,
details: Option<&str>,
) -> Result<(), String>
pub async fn log_debug( &self, command: &str, message: &str, details: Option<&str>, ) -> Result<(), String>
Log a debug message (only if debug is enabled)
Sourcepub async fn log_timed(
&self,
level: LogLevel,
command: &str,
message: &str,
duration_ms: u64,
) -> Result<(), String>
pub async fn log_timed( &self, level: LogLevel, command: &str, message: &str, duration_ms: u64, ) -> Result<(), String>
Log a timed operation
Sourcepub async fn log_command_execution(
&self,
command: &str,
cmd_args: &[&str],
start_time: Instant,
) -> Result<(), String>
pub async fn log_command_execution( &self, command: &str, cmd_args: &[&str], start_time: Instant, ) -> Result<(), String>
Log command execution with timing
Sourcepub async fn log_process_output(
&self,
command: &str,
process_name: &str,
stdout: &str,
stderr: &str,
) -> Result<(), String>
pub async fn log_process_output( &self, command: &str, process_name: &str, stdout: &str, stderr: &str, ) -> Result<(), String>
Log process output
pub fn get_project_name(&self) -> Option<String>
Auto Trait Implementations§
impl Freeze for XbpLogger
impl RefUnwindSafe for XbpLogger
impl Send for XbpLogger
impl Sync for XbpLogger
impl Unpin for XbpLogger
impl UnsafeUnpin for XbpLogger
impl UnwindSafe for XbpLogger
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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