pub struct LoggingConfiguration {
pub log_level: LogLevel,
pub log_format_json: bool,
pub log_format_rfc3339: bool,
pub log_to_console: bool,
pub log_to_syslog: bool,
pub syslog_uri: String,
pub syslog_rfc: bool,
pub log_file: String,
pub log_file_max_size: ByteSize,
pub log_file_max_rolls: usize,
}Expand description
Logging configuration.
This is a plain value type. Callers construct instances directly, either via simple for a basic
console-only configuration or via a translator that maps from the application’s wider configuration into this
type, applying any application-specific rules.
Fields§
§log_level: LogLevelVerbosity directives (for example, info, debug, saluki=trace).
log_format_json: boolWhether to emit log records as JSON instead of the default human-readable format.
log_format_rfc3339: boolWhether to use RFC 3339 timestamps (2024-12-31T23:59:59Z) in log output.
When false (the default), timestamps use the legacy format (2024-12-31 23:59:59 UTC).
Defaults to false.
log_to_console: boolWhether to write log records to standard output.
log_to_syslog: boolWhether to write log records to syslog.
Defaults to false. When this is true and syslog_uri is empty, callers should resolve the destination to
the platform’s default local syslog URI before constructing the logging output stack.
syslog_uri: StringURI of the syslog destination.
Defaults to an empty string. An empty value means “use the platform default” only when log_to_syslog is
enabled; otherwise it has no effect. Supported URI schemes are handled by the syslog output implementation.
syslog_rfc: boolWhether to use the Agent’s RFC-style syslog header.
Defaults to false, which preserves the Agent’s legacy syslog header format. Set this to true when the
receiving syslog daemon expects the Agent’s RFC-style header.
log_file: StringPath to the log file to write to, or empty to disable file logging.
log_file_max_size: ByteSizeMaximum size of a log file before it’s rolled over.
log_file_max_rolls: usizeMaximum number of rolled-over log files to retain.
Implementations§
Auto Trait Implementations§
impl !Freeze for LoggingConfiguration
impl RefUnwindSafe for LoggingConfiguration
impl Send for LoggingConfiguration
impl Sync for LoggingConfiguration
impl Unpin for LoggingConfiguration
impl UnwindSafe for LoggingConfiguration
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
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Track for T
impl<T> Track for T
Source§fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
Tracked wrapper. Read moreSource§fn in_current_resource_group(self) -> Tracked<Self>
fn in_current_resource_group(self) -> Tracked<Self>
Tracked wrapper. Read more