@@ -258,21 +258,21 @@ impl Builder {
258
258
259
259
/// Whether or not to write the level in the default format.
260
260
pub fn format_level ( & mut self , write : bool ) -> & mut Self {
261
- self . format . default_format . level = write;
261
+ self . format . default_format . level ( write) ;
262
262
self
263
263
}
264
264
265
265
/// Whether or not to write the source file path in the default format.
266
266
pub fn format_file ( & mut self , write : bool ) -> & mut Self {
267
- self . format . default_format . source_file = write;
267
+ self . format . default_format . file ( write) ;
268
268
self
269
269
}
270
270
271
271
/// Whether or not to write the source line number path in the default format.
272
272
///
273
273
/// Only has effect if `format_file` is also enabled
274
274
pub fn format_line_number ( & mut self , write : bool ) -> & mut Self {
275
- self . format . default_format . source_line_number = write;
275
+ self . format . default_format . line_number ( write) ;
276
276
self
277
277
}
278
278
@@ -287,26 +287,26 @@ impl Builder {
287
287
288
288
/// Whether or not to write the module path in the default format.
289
289
pub fn format_module_path ( & mut self , write : bool ) -> & mut Self {
290
- self . format . default_format . module_path = write;
290
+ self . format . default_format . module_path ( write) ;
291
291
self
292
292
}
293
293
294
294
/// Whether or not to write the target in the default format.
295
295
pub fn format_target ( & mut self , write : bool ) -> & mut Self {
296
- self . format . default_format . target = write;
296
+ self . format . default_format . target ( write) ;
297
297
self
298
298
}
299
299
300
300
/// Configures the amount of spaces to use to indent multiline log records.
301
301
/// A value of `None` disables any kind of indentation.
302
302
pub fn format_indent ( & mut self , indent : Option < usize > ) -> & mut Self {
303
- self . format . default_format . indent = indent;
303
+ self . format . default_format . indent ( indent) ;
304
304
self
305
305
}
306
306
307
307
/// Configures if timestamp should be included and in what precision.
308
308
pub fn format_timestamp ( & mut self , timestamp : Option < fmt:: TimestampPrecision > ) -> & mut Self {
309
- self . format . default_format . timestamp = timestamp;
309
+ self . format . default_format . timestamp ( timestamp) ;
310
310
self
311
311
}
312
312
@@ -332,7 +332,7 @@ impl Builder {
332
332
333
333
/// Configures the end of line suffix.
334
334
pub fn format_suffix ( & mut self , suffix : & ' static str ) -> & mut Self {
335
- self . format . default_format . suffix = suffix;
335
+ self . format . default_format . suffix ( suffix) ;
336
336
self
337
337
}
338
338
@@ -351,7 +351,7 @@ impl Builder {
351
351
where
352
352
F : Fn ( & mut Formatter , & dyn log:: kv:: Source ) -> io:: Result < ( ) > + Sync + Send + ' static ,
353
353
{
354
- self . format . default_format . kv_format = Some ( Box :: new ( format) ) ;
354
+ self . format . default_format . key_values ( format) ;
355
355
self
356
356
}
357
357
0 commit comments