Struct flexi_logger::LogOptions [] [src]

pub struct LogOptions(_);
Deprecated

Deprecated. Use Logger instead.

Methods

impl LogOptions
[src]

[src]

The defaults for the logger initialization are

  • log_to_file(false)
  • print_message(true)
  • duplicate_error(true)
  • duplicate_info(false)
  • format(flexi_logger::default_format)
  • directory(None)
  • suffix(Some("log".to_string()))
  • timestamp(false)
  • rotate_over_size(None)
  • discriminant(None)
  • symlink(None)

[src]

Sets the option for logging to a file.

If this option is set to true, all logs will be written to a file, otherwise to stderr.

[src]

Sets the option for printing out an info message when a new output file is used.

If this option is set to true, an info message is printed to stdout when a new file is used for log-output.

[src]

Sets the option for duplicating logged error messages to stdout.

If this option is true and duplicate_error is set to true, then all logged error messages are additionally written to stdout.

[src]

Sets the option for duplicating logged error, warning and info messages to stdout.

If log_to_file is true and duplicate_info is set to true, then all logged error, warning, and info messages are additionally written to stdout.

[src]

Specifies a formatting function for the log entries.

The function being used by default is formats::default_format.

[src]

Specifies a folder for the log files.

This parameter only has an effect if log_to_file is set to true. If set to None, the log files are created in the folder where the program was started, otherwise in the specified folder. If the folder does not exist, the initialization will fail.

[src]

Specifies a suffix for the log files.

This parameter only has an effect if log_to_file is set to true.

If not set to None, then the log files are created with the specified suffix.

[src]

Sets the option for including a timestamp into the name of the log files.

This parameter only has an effect if log_to_file is set to true.

If set to true, then the names of the log files will include a timestamp.

[src]

Sets the option for specifying a maximum size for log files in bytes.

This parameter only has an effect if log_to_file is set to true.

If set to None, the log file will grow indefinitely. If a value is set, then when the log file reaches or exceeds the specified file size, the file will be closed and a new file will be opened. The filename pattern changes - instead of the timestamp a serial number is included into the filename.

[src]

Sets the option for specifying an additional part of the log file name.

This parameter only has an effect if log_to_file is set to true.

If specified, the additional part of the log file name is inserted after the program name.

Sets the option for including a timestamp into the name of the log files.

This parameter only has an effect if log_to_file is set to true.

If a String is specified, it will be used on linux systems to create in the current folder a symbolic link to the current log file.

[src]

Consumes the LogOptions object and initializes the flexi_logger.

Trait Implementations

impl Default for LogOptions
[src]

[src]

Returns the "default value" for a type. Read more