Skip to content

Commit

Permalink
Map "info" level to journald "info" priority
Browse files Browse the repository at this point in the history
  • Loading branch information
hongquan committed Jul 14, 2023
1 parent 63ce858 commit 92cd43f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tracing-journald/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ mod socket;
///
/// - `ERROR` => Error (3)
/// - `WARN` => Warning (4)
/// - `INFO` => Notice (5)
/// - `DEBUG` => Informational (6)
/// - `INFO` => Informational (6)
/// - `DEBUG` => Debug (7)
/// - `TRACE` => Debug (7)
///
/// The standard journald `CODE_LINE` and `CODE_FILE` fields are automatically emitted. A `TARGET`
Expand Down Expand Up @@ -344,9 +344,8 @@ fn put_priority(buf: &mut Vec<u8>, meta: &Metadata) {
match *meta.level() {
Level::ERROR => b"3",
Level::WARN => b"4",
Level::INFO => b"5",
Level::DEBUG => b"6",
Level::TRACE => b"7",
Level::INFO => b"6",
Level::DEBUG | Level::TRACE => b"7",
},
);
}
Expand Down

0 comments on commit 92cd43f

Please sign in to comment.