[#338] Added parameter word_count to method get_logs #338
2 changed files with 3 additions and 0 deletions
|
@ -250,6 +250,7 @@ class DockerHost(Host):
|
||||||
unit: Optional[str] = None,
|
unit: Optional[str] = None,
|
||||||
exclude_filter: Optional[str] = None,
|
exclude_filter: Optional[str] = None,
|
||||||
priority: Optional[str] = None,
|
priority: Optional[str] = None,
|
||||||
|
word_count: bool = None,
|
||||||
) -> str:
|
) -> str:
|
||||||
client = self._get_docker_client()
|
client = self._get_docker_client()
|
||||||
filtered_logs = ""
|
filtered_logs = ""
|
||||||
|
|
|
@ -324,6 +324,7 @@ class Host(ABC):
|
||||||
unit: Optional[str] = None,
|
unit: Optional[str] = None,
|
||||||
exclude_filter: Optional[str] = None,
|
exclude_filter: Optional[str] = None,
|
||||||
priority: Optional[str] = None,
|
priority: Optional[str] = None,
|
||||||
|
word_count: bool = None,
|
||||||
) -> str:
|
) -> str:
|
||||||
"""Get logs from host filtered by regex.
|
"""Get logs from host filtered by regex.
|
||||||
|
|
||||||
|
@ -334,6 +335,7 @@ class Host(ABC):
|
||||||
unit: required unit.
|
unit: required unit.
|
||||||
priority: logs level, 0 - emergency, 7 - debug. All messages with that code and higher.
|
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.
|
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:
|
Returns:
|
||||||
Found entries as str if any found.
|
Found entries as str if any found.
|
||||||
|
|
Loading…
Reference in a new issue