log-search: Update docs to include client-id as an option.

This commit is contained in:
Alex Vandiver 2022-05-04 17:30:50 -07:00 committed by Tim Abbott
parent b1749259d4
commit df47c5a750
1 changed files with 3 additions and 5 deletions

View File

@ -24,9 +24,7 @@ from scripts.lib.zulip_tools import BOLD, CYAN, ENDC, FAIL, GRAY, OKBLUE
def parser() -> argparse.ArgumentParser: def parser() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(description="Search logfiles, ignoring commonly-fetched URLs.")
description="Search logfiles for an IP or hostname, ignoring commonly-fetched URLs."
)
log_selection = parser.add_argument_group("File selection") log_selection = parser.add_argument_group("File selection")
log_selection_options = log_selection.add_mutually_exclusive_group() log_selection_options = log_selection.add_mutually_exclusive_group()
log_selection_options.add_argument( log_selection_options.add_argument(
@ -58,7 +56,7 @@ def parser() -> argparse.ArgumentParser:
) )
filtering = parser.add_argument_group("Filtering") filtering = parser.add_argument_group("Filtering")
filtering.add_argument("filter", help="IP address or hostname to search for") filtering.add_argument("filter", help="IP address, hostname, or user-id to search for")
filtering.add_argument( filtering.add_argument(
"--all-lines", "--all-lines",
"-L", "-L",
@ -222,7 +220,7 @@ def main() -> None:
string_filter = lambda m: m["hostname"] == filter string_filter = lambda m: m["hostname"] == filter
filter_type = FilterType.HOSTNAME filter_type = FilterType.HOSTNAME
else: else:
raise RuntimeError(f"Can't parse {filter} as an IP or hostname.") raise RuntimeError(f"Can't parse {filter} as an IP, hostname, or user-id.")
assert filter_type is not None assert filter_type is not None
try: try: