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