pub enum RotationStrategy {
KeepAll,
KeepOne,
KeepSome(u32),
}Expand description
Retention policy for rotated log files.
This controls how many old log files are kept when the application starts.
§Example
use tauri_plugin_tracing::{Builder, RotationStrategy};
Builder::new()
.with_file_logging()
.with_rotation_strategy(RotationStrategy::KeepSome(7)) // Keep 7 most recent files
.build::<tauri::Wry>();Variants§
KeepAll
Keep all rotated log files.
KeepOne
Keep only the current log file, deleting all previous ones.
KeepSome(u32)
Keep the N most recent log files.
Trait Implementations§
Source§impl Clone for RotationStrategy
impl Clone for RotationStrategy
Source§fn clone(&self) -> RotationStrategy
fn clone(&self) -> RotationStrategy
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 RotationStrategy
impl Debug for RotationStrategy
Source§impl Default for RotationStrategy
impl Default for RotationStrategy
Source§fn default() -> RotationStrategy
fn default() -> RotationStrategy
Returns the “default value” for a type. Read more
impl Copy for RotationStrategy
Auto Trait Implementations§
impl Freeze for RotationStrategy
impl RefUnwindSafe for RotationStrategy
impl Send for RotationStrategy
impl Sync for RotationStrategy
impl Unpin for RotationStrategy
impl UnwindSafe for RotationStrategy
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