@@ -287,10 +287,9 @@ impl<T: Display> Display for StyledValue<T> {
287
287
#[ cfg( not( feature = "color" ) ) ]
288
288
type StyledValue < T > = T ;
289
289
290
- /// The default format.
291
- ///
292
- /// This format needs to work with any combination of crate features.
293
- pub ( crate ) struct ConfigurableFormat {
290
+ /// A [`RecordFormat`] with settings for which fields to show
291
+ pub struct ConfigurableFormat {
292
+ // This format needs to work with any combination of crate features.
294
293
pub ( crate ) timestamp : Option < TimestampPrecision > ,
295
294
pub ( crate ) module_path : bool ,
296
295
pub ( crate ) target : bool ,
@@ -305,52 +304,52 @@ pub(crate) struct ConfigurableFormat {
305
304
306
305
impl ConfigurableFormat {
307
306
/// Whether or not to write the level in the default format.
308
- pub ( crate ) fn level ( & mut self , write : bool ) -> & mut Self {
307
+ pub fn level ( & mut self , write : bool ) -> & mut Self {
309
308
self . level = write;
310
309
self
311
310
}
312
311
313
312
/// Whether or not to write the source file path in the default format.
314
- pub ( crate ) fn file ( & mut self , write : bool ) -> & mut Self {
313
+ pub fn file ( & mut self , write : bool ) -> & mut Self {
315
314
self . source_file = write;
316
315
self
317
316
}
318
317
319
318
/// Whether or not to write the source line number path in the default format.
320
319
///
321
320
/// Only has effect if `format_file` is also enabled
322
- pub ( crate ) fn line_number ( & mut self , write : bool ) -> & mut Self {
321
+ pub fn line_number ( & mut self , write : bool ) -> & mut Self {
323
322
self . source_line_number = write;
324
323
self
325
324
}
326
325
327
326
/// Whether or not to write the module path in the default format.
328
- pub ( crate ) fn module_path ( & mut self , write : bool ) -> & mut Self {
327
+ pub fn module_path ( & mut self , write : bool ) -> & mut Self {
329
328
self . module_path = write;
330
329
self
331
330
}
332
331
333
332
/// Whether or not to write the target in the default format.
334
- pub ( crate ) fn target ( & mut self , write : bool ) -> & mut Self {
333
+ pub fn target ( & mut self , write : bool ) -> & mut Self {
335
334
self . target = write;
336
335
self
337
336
}
338
337
339
338
/// Configures the amount of spaces to use to indent multiline log records.
340
339
/// A value of `None` disables any kind of indentation.
341
- pub ( crate ) fn indent ( & mut self , indent : Option < usize > ) -> & mut Self {
340
+ pub fn indent ( & mut self , indent : Option < usize > ) -> & mut Self {
342
341
self . indent = indent;
343
342
self
344
343
}
345
344
346
345
/// Configures if timestamp should be included and in what precision.
347
- pub ( crate ) fn timestamp ( & mut self , timestamp : Option < TimestampPrecision > ) -> & mut Self {
346
+ pub fn timestamp ( & mut self , timestamp : Option < TimestampPrecision > ) -> & mut Self {
348
347
self . timestamp = timestamp;
349
348
self
350
349
}
351
350
352
351
/// Configures the end of line suffix.
353
- pub ( crate ) fn suffix ( & mut self , suffix : & ' static str ) -> & mut Self {
352
+ pub fn suffix ( & mut self , suffix : & ' static str ) -> & mut Self {
354
353
self . suffix = suffix;
355
354
self
356
355
}
@@ -366,7 +365,7 @@ impl ConfigurableFormat {
366
365
/// The default format uses a space to separate each key-value pair, with an "=" between
367
366
/// the key and value.
368
367
#[ cfg( feature = "kv" ) ]
369
- pub ( crate ) fn key_values < F > ( & mut self , format : F ) -> & mut Self
368
+ pub fn key_values < F > ( & mut self , format : F ) -> & mut Self
370
369
where
371
370
F : Fn ( & mut Formatter , & dyn log:: kv:: Source ) -> io:: Result < ( ) > + Sync + Send + ' static ,
372
371
{
0 commit comments