pub trait MakeWriter:
Send
+ Sync
+ 'static {
type Writer: Write + Send + 'static;
// Required method
fn make_writer(&self) -> Self::Writer;
// Provided method
fn make_writer_for(&self, _sev: Severity) -> Self::Writer { ... }
}Expand description
A factory that yields one io::Write per batch. Cheap to call.
Spec 20 § 3.3.
Required Associated Types§
Sourcetype Writer: Write + Send + 'static
type Writer: Write + Send + 'static
The writer type produced by Self::make_writer; usually
Stdout, Stderr, or a guard around a file handle.
Required Methods§
Sourcefn make_writer(&self) -> Self::Writer
fn make_writer(&self) -> Self::Writer
Yield a writer for this batch.
Provided Methods§
Sourcefn make_writer_for(&self, _sev: Severity) -> Self::Writer
fn make_writer_for(&self, _sev: Severity) -> Self::Writer
Yield a severity-specific writer; defaults to
Self::make_writer.