pub struct ServerLogger { /* private fields */ }Implementations§
Source§impl ServerLogger
impl ServerLogger
pub fn new_with_config( server_name: &str, port: u16, logging_config: &LoggingConfig, ) -> Result<Self>
pub fn new(server_name: &str, port: u16) -> Result<Self>
pub async fn log_server_start(&self) -> Result<()>
pub async fn log_server_stop(&self) -> Result<()>
pub async fn log_request( &self, req: &HttpRequest, status: u16, response_time: u64, bytes_sent: u64, ) -> Result<()>
pub async fn log_security_alert( &self, ip: &str, reason: &str, details: &str, ) -> Result<()>
pub async fn log_performance_warning( &self, metric: &str, value: u64, threshold: u64, ) -> Result<()>
pub async fn write_log_entry(&self, entry: ServerLogEntry) -> Result<()>
pub fn get_log_file_size_bytes(&self) -> Result<u64>
pub fn list_log_files(&self) -> Result<Vec<PathBuf>>
pub async fn get_request_stats(&self) -> Result<ServerStats>
pub fn get_config_summary(&self) -> String
Auto Trait Implementations§
impl Freeze for ServerLogger
impl RefUnwindSafe for ServerLogger
impl Send for ServerLogger
impl Sync for ServerLogger
impl Unpin 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
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