emit_file

Function set

Source
pub fn set(file_set: impl AsRef<Path>) -> FileSetBuilder
Expand description

Create a builder for a FileSet using the default newline-delimited JSON format.

The builder will use file_set as its template for naming log files. See the crate root documentation for details on how this argument is interpreted.

It will use the other following defaults:

  • Roll by hour.
  • 32 max files.
  • 1GiB max file size.

The FileSetBuilder has configuration options for managing the number and size of log files.

Once configured, call FileSetBuilder::spawn to complete the builder, passing the resulting FileSet to emit::Setup::emit_to.