File tree 1 file changed +14
-7
lines changed
1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -292,6 +292,19 @@ pub(crate) struct ConfigurableFormat {
292
292
pub ( crate ) kv_format : Option < Box < KvFormatFn > > ,
293
293
}
294
294
295
+ impl ConfigurableFormat {
296
+ /// Format the [`Record`] as configured for outputting
297
+ pub ( crate ) fn format ( & self , formatter : & mut Formatter , record : & Record < ' _ > ) -> io:: Result < ( ) > {
298
+ let fmt = ConfigurableFormatWriter {
299
+ format : self ,
300
+ buf : formatter,
301
+ written_header_value : false ,
302
+ } ;
303
+
304
+ fmt. write ( record)
305
+ }
306
+ }
307
+
295
308
impl ConfigurableFormat {
296
309
/// Whether or not to write the level in the default format.
297
310
pub ( crate ) fn level ( & mut self , write : bool ) -> & mut Self {
@@ -383,13 +396,7 @@ impl Default for ConfigurableFormat {
383
396
384
397
impl RecordFormat for ConfigurableFormat {
385
398
fn format ( & self , formatter : & mut Formatter , record : & Record < ' _ > ) -> io:: Result < ( ) > {
386
- let fmt = ConfigurableFormatWriter {
387
- format : self ,
388
- buf : formatter,
389
- written_header_value : false ,
390
- } ;
391
-
392
- fmt. write ( record)
399
+ self . format ( formatter, record)
393
400
}
394
401
}
395
402
You can’t perform that action at this time.
0 commit comments