File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 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 {
292292 pub ( crate ) kv_format : Option < Box < KvFormatFn > > ,
293293}
294294
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+
295308impl ConfigurableFormat {
296309 /// Whether or not to write the level in the default format.
297310 pub ( crate ) fn level ( & mut self , write : bool ) -> & mut Self {
@@ -383,13 +396,7 @@ impl Default for ConfigurableFormat {
383396
384397impl RecordFormat for ConfigurableFormat {
385398 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)
393400 }
394401}
395402
You can’t perform that action at this time.
0 commit comments