|
1 | 1 | use std::{io, os::raw::c_int}; |
2 | 2 |
|
3 | 3 | use crate::{ |
4 | | - formatter::{Formatter, FormatterContext, JournaldFormatter}, |
| 4 | + formatter::{Formatter, FormatterContext, PartialFormatter}, |
5 | 5 | sink::{GetSinkProp, Sink, SinkProp}, |
6 | 6 | sync::*, |
7 | 7 | Error, ErrorHandler, Level, LevelFilter, Record, Result, StdResult, StringBuf, |
@@ -97,19 +97,24 @@ impl JournaldSink { |
97 | 97 |
|
98 | 98 | /// Gets a builder of `JournaldSink` with default parameters: |
99 | 99 | /// |
100 | | - /// | Parameter | Default Value | |
101 | | - /// |-----------------|-----------------------------| |
102 | | - /// | [level_filter] | [`LevelFilter::All`] | |
103 | | - /// | [formatter] | `JournaldFormatter` | |
104 | | - /// | [error_handler] | [`ErrorHandler::default()`] | |
| 100 | + /// | Parameter | Default Value | |
| 101 | + /// |-----------------|-------------------------------------------------| |
| 102 | + /// | [level_filter] | [`LevelFilter::All`] | |
| 103 | + /// | [formatter] | [`PartialFormatter`] `(!time !source_location)` | |
| 104 | + /// | [error_handler] | [`ErrorHandler::default()`] | |
105 | 105 | /// |
106 | 106 | /// [level_filter]: JournaldSinkBuilder::level_filter |
107 | 107 | /// [formatter]: JournaldSinkBuilder::formatter |
108 | 108 | /// [error_handler]: JournaldSinkBuilder::error_handler |
109 | 109 | #[must_use] |
110 | 110 | pub fn builder() -> JournaldSinkBuilder { |
111 | 111 | let prop = SinkProp::default(); |
112 | | - prop.set_formatter(JournaldFormatter::new()); |
| 112 | + prop.set_formatter( |
| 113 | + PartialFormatter::builder() |
| 114 | + .time(false) |
| 115 | + .source_location(false) |
| 116 | + .build(), |
| 117 | + ); |
113 | 118 |
|
114 | 119 | JournaldSinkBuilder { prop } |
115 | 120 | } |
@@ -174,7 +179,8 @@ impl JournaldSinkBuilder { |
174 | 179 |
|
175 | 180 | /// Specifies a formatter. |
176 | 181 | /// |
177 | | - /// This parameter is **optional**, and defaults to `JournaldFormatter`. |
| 182 | + /// This parameter is **optional**, and defaults to [`PartialFormatter`] |
| 183 | + /// `(!time !source_location)`. |
178 | 184 | #[must_use] |
179 | 185 | pub fn formatter<F>(self, formatter: F) -> Self |
180 | 186 | where |
|
0 commit comments