journalctl 特定のエラーレベルのログを抽出したい場合

journalctlコマンドの-pオプションについてググってもあまりヒットしなかったのでmanの出力をメモ


Filter output by message priorities or priority ranges. Takes either a single
numeric or textual log level (i.e. between 0/"emerg" and 7/"debug"), or a range
of numeric/text log levels in the form FROM..TO. The log levels are the usual
syslog log levels as documented in syslog(3), i.e. "emerg" (0), "alert" (1),
"crit" (2), "err" (3), "warning" (4), "notice" (5), "info" (6), "debug" (7). If
a single log level is specified, all messages with this log level or a lower
(hence more important) log level are shown. If a range is specified, all
messages within the range are shown, including both the start and the end value
of the range. This will add "PRIORITY=" matches for the specified priorities.


エラーのレベルが高い順(致命的なエラー順)に

  1. emerg
  2. alert
  3. crit
  4. err
  5. warning
  6. notice
  7. info
  8. debug


例)errレベルを抽出して出力する場合
journalctl -p err