pub struct LoggingConfig {
pub level: Level,
pub timestamps: bool,
pub targets: bool,
pub file_line: bool,
}Expand description
Logging configuration for the server.
Fields§
§level: LevelMinimum log level (default: INFO).
timestamps: boolShow timestamps in logs (default: true).
targets: boolShow module targets in logs (default: true).
file_line: boolShow file:line in logs (default: false).
Implementations§
Source§impl LoggingConfig
impl LoggingConfig
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Create logging config from environment variables.
Respects:
FASTMCP_LOG: Log level (error, warn, info, debug, trace)FASTMCP_LOG_TIMESTAMPS: Show timestamps (0/false to disable)FASTMCP_LOG_TARGETS: Show targets (0/false to disable)FASTMCP_LOG_FILE_LINE: Show file:line (1/true to enable)
Trait Implementations§
Source§impl Clone for LoggingConfig
impl Clone for LoggingConfig
Source§fn clone(&self) -> LoggingConfig
fn clone(&self) -> LoggingConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LoggingConfig
impl Debug for LoggingConfig
Auto Trait Implementations§
impl Freeze for LoggingConfig
impl RefUnwindSafe for LoggingConfig
impl Send for LoggingConfig
impl Sync for LoggingConfig
impl Unpin for LoggingConfig
impl UnwindSafe for LoggingConfig
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).