Struct server::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<'b>(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<()>
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
Errif the a logfile was specified, but it could not be opened in write-append-create mode. - Returns an
Errwith kindAlreadyExistsif this method is called more than once in one running program.