Struct sloggers::file::FileLoggerBuilder
[−]
[src]
pub struct FileLoggerBuilder { /* fields omitted */ }
A logger builder which build loggers that write log records to the specified file.
The resulting logger will work asynchronously (the default channel size is 1024).
Methods
impl FileLoggerBuilder
[src]
fn new<P: AsRef<Path>>(path: P) -> Self
[src]
Makes a new FileLoggerBuilder
instance.
This builder will create a logger which uses path
as
the output destination of the log records.
fn format(&mut self, format: Format) -> &mut Self
[src]
Sets the format of log records.
fn source_location(&mut self, source_location: SourceLocation) -> &mut Self
[src]
Sets the source code location type this logger will use.
fn timezone(&mut self, timezone: TimeZone) -> &mut Self
[src]
Sets the time zone which this logger will use.
fn level(&mut self, severity: Severity) -> &mut Self
[src]
Sets the log level of this logger.
fn channel_size(&mut self, channel_size: usize) -> &mut Self
[src]
Sets the size of the asynchronous channel of this logger.
fn truncate(&mut self) -> &mut Self
[src]
By default, logger just appends log messages to file. If this method called, logger truncates the file to 0 length when opening.