[#338] Added parameter word_count to method get_logs
Signed-off-by: Ilyas Niyazov <i.niyazov@yadro.com>
This commit is contained in:
parent
cc7bd4ffc9
commit
335eed85b1
2 changed files with 3 additions and 0 deletions
|
@ -250,6 +250,7 @@ class DockerHost(Host):
|
|||
unit: Optional[str] = None,
|
||||
exclude_filter: Optional[str] = None,
|
||||
priority: Optional[str] = None,
|
||||
word_count: bool = None,
|
||||
) -> str:
|
||||
client = self._get_docker_client()
|
||||
filtered_logs = ""
|
||||
|
|
|
@ -324,6 +324,7 @@ class Host(ABC):
|
|||
unit: Optional[str] = None,
|
||||
exclude_filter: Optional[str] = None,
|
||||
priority: Optional[str] = None,
|
||||
word_count: bool = None,
|
||||
) -> str:
|
||||
"""Get logs from host filtered by regex.
|
||||
|
||||
|
@ -334,6 +335,7 @@ class Host(ABC):
|
|||
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.
|
||||
word_count: output type, expected values: lines, bytes, json
|
||||
|
||||
Returns:
|
||||
Found entries as str if any found.
|
||||
|
|
Loading…
Reference in a new issue