log-search: Fix attempts to limit to events requests in Django logs.

This commit is contained in:
Alex Vandiver 2024-02-26 15:03:21 +00:00
parent 4372138f13
commit 4735be85a7
1 changed files with 4 additions and 0 deletions

View File

@ -284,6 +284,10 @@ def parse_filters(
filter_funcs = [] filter_funcs = []
filter_terms = [] filter_terms = []
if args.events and not args.nginx:
logging.warning("Adding --nginx -- /events requests do not appear in Django logs.")
args.nginx = True
for filter_term in args.filter_terms: for filter_term in args.filter_terms:
if re.match(r"[1-5][0-9][0-9]$", filter_term): if re.match(r"[1-5][0-9][0-9]$", filter_term):
filter_func = lambda m, t=filter_term: m["code"] == t filter_func = lambda m, t=filter_term: m["code"] == t