Skip to main content

LoggerConfig

Struct LoggerConfig 

Source
pub struct LoggerConfig {
    pub service_name: ServiceName,
    pub log_root: PathBuf,
    pub level: LevelFilter,
    pub queue_capacity: usize,
    pub rotation: RotationPolicy,
    pub retention: RetentionPolicy,
    pub redaction: RedactionPolicy,
    pub process_identity: ProcessIdentityPolicy,
    pub enable_file_sink: bool,
    pub enable_console_sink: bool,
}
Expand description

Public configuration for the lightweight logging runtime.

Fields§

§service_name: ServiceName

Stable service name attached to emitted records.

§log_root: PathBuf

Root directory that owns the service log tree.

§level: LevelFilter

Minimum severity level emitted by the logger.

§queue_capacity: usize

Reserved for future async/backpressure implementation. Phase 1 execution is synchronous; this value is stored but not yet applied.

§rotation: RotationPolicy

Rotation settings for the built-in JSONL sink.

§retention: RetentionPolicy

Retention settings for rotated JSONL files.

§redaction: RedactionPolicy

Redaction policy applied before sink fan-out.

§process_identity: ProcessIdentityPolicy

Process identity policy for emitted records.

§enable_file_sink: bool

Whether the built-in JSONL file sink is enabled.

§enable_console_sink: bool

Whether the built-in console sink is enabled.

Implementations§

Source§

impl LoggerConfig

Source

pub fn default_for(service_name: ServiceName, log_root: PathBuf) -> Self

Builds the documented v1 defaults for a service-scoped logger configuration.

If constants::SC_LOG_ROOT_ENV_VAR is set, it is used only when log_root is empty. A non-empty log_root parameter is treated as explicit configuration and takes precedence over the environment helper per LOG-009.

Trait Implementations§

Source§

impl Debug for LoggerConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Observable for T
where T: Send + Sync + 'static,