pub struct LogsService { /* private fields */ }Expand description
Service for managing log file operations
Implementations§
Source§impl LogsService
impl LogsService
Sourcepub fn collect_log_files(
&self,
filters: &LogFileFilters,
) -> Result<HashMap<String, PathBuf>>
pub fn collect_log_files( &self, filters: &LogFileFilters, ) -> Result<HashMap<String, PathBuf>>
Collect log files matching filters
Returns a map of log file stem names to their paths.
Sourcepub async fn read_logs(
&self,
log_sources: &HashMap<String, PathBuf>,
filters: &LogContentFilters,
) -> Result<Vec<LogLine>>
pub async fn read_logs( &self, log_sources: &HashMap<String, PathBuf>, filters: &LogContentFilters, ) -> Result<Vec<LogLine>>
Read logs from multiple sources and apply filters
Returns all matching log lines with source information.
Sourcepub fn should_display_line(
&self,
line: &str,
filters: &LogContentFilters,
) -> bool
pub fn should_display_line( &self, line: &str, filters: &LogContentFilters, ) -> bool
Check if a line should be displayed based on filters
Sourcepub fn open_for_follow(
&self,
log_sources: &HashMap<String, PathBuf>,
) -> Result<HashMap<String, BufReader<File>>>
pub fn open_for_follow( &self, log_sources: &HashMap<String, PathBuf>, ) -> Result<HashMap<String, BufReader<File>>>
Open log files for following (watching)
Returns a map of readers positioned at the end of each file.
Sourcepub fn read_new_lines(
&self,
reader: &mut BufReader<File>,
filters: &LogContentFilters,
) -> Result<Vec<String>>
pub fn read_new_lines( &self, reader: &mut BufReader<File>, filters: &LogContentFilters, ) -> Result<Vec<String>>
Read new lines from a reader
Returns lines that have been added since the last read.
Auto Trait Implementations§
impl Freeze for LogsService
impl RefUnwindSafe for LogsService
impl Send for LogsService
impl Sync for LogsService
impl Unpin for LogsService
impl UnwindSafe for LogsService
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> 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