@@ -133,7 +133,7 @@ impl Subscriber {
133
133
self
134
134
}
135
135
136
- /// Sets the mappings from the tracing level to the journald priorities.
136
+ /// Sets how [` tracing::Level`]s are mapped to [ journald priorities](Priority) .
137
137
pub fn with_priority_mappings ( mut self , mappings : PriorityMappings ) -> Self {
138
138
self . priority_mappings = mappings;
139
139
self
@@ -363,7 +363,7 @@ impl Visit for EventVisitor<'_> {
363
363
}
364
364
}
365
365
366
- /// A priority (in syslog called severity code) is used to mark the
366
+ /// A priority (called " severity code" by syslog ) is used to mark the
367
367
/// importance of a message.
368
368
///
369
369
/// Descriptions and examples are taken from the [Arch Linux wiki].
@@ -431,7 +431,9 @@ pub enum Priority {
431
431
Debug = b'7' ,
432
432
}
433
433
434
- /// Mappings from the tracing levels to the journald priorities.
434
+ /// Mappings from tracing [`Level`]s to journald [priorities].
435
+ ///
436
+ /// [priorities]: Priority
435
437
#[ derive( Debug , Clone ) ]
436
438
pub struct PriorityMappings {
437
439
/// Priority mapped to the `ERROR` level
@@ -447,13 +449,13 @@ pub struct PriorityMappings {
447
449
}
448
450
449
451
impl PriorityMappings {
450
- /// Create new default mappings:
452
+ /// Returns the default priority mappings:
451
453
///
452
- /// - `tracing::Level::ERROR`: Error (3)
453
- /// - `tracing::Level::WARN`: Warning (4)
454
- /// - `tracing::Level::INFO`: Notice (5)
455
- /// - `tracing::Level::DEBUG`: Informational (6)
456
- /// - `tracing::Level::TRACE`: Debug (7)
454
+ /// - [ `tracing::Level::ERROR`]: [`Priority:: Error`] (3)
455
+ /// - [ `tracing::Level::WARN`]: [`Priority:: Warning`] (4)
456
+ /// - [ `tracing::Level::INFO`]: [`Priority:: Notice`] (5)
457
+ /// - [ `tracing::Level::DEBUG`]: [`Priority:: Informational`] (6)
458
+ /// - [ `tracing::Level::TRACE`]: [`Priority:: Debug`] (7)
457
459
pub fn new ( ) -> PriorityMappings {
458
460
Self {
459
461
error : Priority :: Error ,
0 commit comments