A record's source assigns its priority. -p picks a level and everything more severe.
There are eight levels, from the most severe to the lightest:
| Level | Number |
|---|---|
emerg, alert, crit |
0, 1, 2 |
err |
3 |
warning, notice |
4, 5 |
info, debug |
6, 7 |
-p err shows levels 0 to 3. The lab-demo program writes settings-missing with the err priority and start with info. The service sent the cat error about the missing file to the journal as ordinary output, at the info level — and -p err hid it, although that is exactly where the cause of the failure shows.
A narrow selection shows what broke. The full selection of the same service shows the order of events and the details.
-p err left two lines of the failed run. What will -p warning show?
-
The
warningthreshold is wider: awarning-level line joins the errors,Failed with result 'exit-code'. -
-pis a threshold: the chosen level and everything more severe are shown.erris more severe thanwarning, so the errors stay.
-p warning shows levels 0 to 4: Failed with result 'exit-code' joined settings-missing and Failed to start.
Key points
-
-psets a threshold: the chosen level and everything more severe. - The program picks the priority, and an important detail may sit a level lower.
- Look for the cause among the errors and for the order of events in the full selection.