[][src]Struct easylog::log_file_config::LogFileConfig

pub struct LogFileConfig {
    pub max_size_in_mb: u64,
    pub path: String,
    pub name: String,
    pub extension: String,
    pub overwrite: bool,
    pub truncate: bool,
    pub num_files_to_keep: u64,
}

Struct to hold the configuration for the logfile

Fields

max_size_in_mb: u64

maximum size for the logfile in MegaBytes - example: 1, 2, 3, 4, etc.

path: String

Path to the file - example: "./", "~/logfolder/"

name: String

filename - example: "logfile_", "my_log"

extension: String

fileextension - example: ".log", ".txt"

overwrite: bool

shall files be overwriten (starting from the first) when num_files_to_keep is reached.

truncate: bool

shall the file be truncated.

num_files_to_keep: u64

how many files shall be kept, if overwrite is true. If overwrite is false, this param has no effect.

Methods

impl LogFileConfig[src]

pub fn new() -> LogFileConfig[src]

Returns a LogFileConfig-struct with default parameters

Default Params:

  • max_size_in_mb: 1
  • path: "./"
  • name: "logfile_"
  • extension: ".log"
  • overwrite: true
  • truncate: true
  • num_files_to_keep: 5

Trait Implementations

impl Clone for LogFileConfig[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.