[#252] add filter priority to get_filtered_logs method

This commit is contained in:
Ilyas Niyazov 2024-06-28 17:13:35 +03:00 committed by Andrey Berezin
parent 3a4204f2e4
commit f4460194bc
3 changed files with 5 additions and 1 deletions

View file

@ -297,6 +297,7 @@ class Host(ABC):
until: Optional[datetime] = None,
unit: Optional[str] = None,
exclude_filter: Optional[str] = None,
priority: Optional[str] = None
) -> str:
"""Get logs from host filtered by regex.
@ -305,6 +306,8 @@ class Host(ABC):
since: If set, limits the time from which logs should be collected. Must be in UTC.
until: If set, limits the time until which logs should be collected. Must be in UTC.
unit: required unit.
priority: logs level, 0 - emergency, 7 - debug. All messages with that code and higher.
For example, if we specify the -p 2 option, journalctl will show all messages with levels 2, 1 and 0.
Returns:
Found entries as str if any found.