Struct uosql::logger::Builder [] [src]

pub struct Builder<'a> {
    // some fields omitted
}

A builder type to easily configure the logger.

Methods

impl<'a> Builder<'a>

fn with_logfile(self, path: &'b Path) -> Builder<'b>

Enables logging into the given file

fn without_stdout(self) -> Builder<'a>

Disables logging to stdout (which is enabled by default)

fn enable(self) -> Result<(), Error>

Creates the Logger from the given configuration and enables it globally. Any log messages generated before this method is called, will be ignored.

Failures

  • Returns an Err if the a logfile was specified, but it could not be opened in write-append-create mode.
  • Returns an Err with kind AlreadyExists if this method is called more than once in one running program.