mirror of https://github.com/zulip/zulip.git
log-search: Compare lowered terms to lowered log line.
This allows us to search for upper-case things.
This commit is contained in:
parent
90205a490d
commit
b2666bf054
|
@ -185,6 +185,7 @@ def main() -> None:
|
||||||
print("! nginx logs not suggested for timeline, due to imprecision", file=sys.stderr)
|
print("! nginx logs not suggested for timeline, due to imprecision", file=sys.stderr)
|
||||||
|
|
||||||
use_color = sys.stdout.isatty()
|
use_color = sys.stdout.isatty()
|
||||||
|
lowered_terms = [term.lower() for term in args.filter_terms]
|
||||||
try:
|
try:
|
||||||
for logfile_name in reversed(logfile_names):
|
for logfile_name in reversed(logfile_names):
|
||||||
with maybe_gzip(logfile_name) as logfile:
|
with maybe_gzip(logfile_name) as logfile:
|
||||||
|
@ -192,7 +193,7 @@ def main() -> None:
|
||||||
# As a performance optimization, just do a substring
|
# As a performance optimization, just do a substring
|
||||||
# check before we parse the line fully
|
# check before we parse the line fully
|
||||||
lowered = logline.lower()
|
lowered = logline.lower()
|
||||||
if not all(f in lowered for f in args.filter_terms):
|
if not all(f in lowered for f in lowered_terms):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if args.nginx:
|
if args.nginx:
|
||||||
|
|
Loading…
Reference in New Issue