feat: Add current user to apache-style request logging.

This commit is contained in:
Wolfgang Walther
2022-01-07 20:26:33 +01:00
committed by Wolfgang Walther
parent 3c17f97c87
commit 9639cd5751
3 changed files with 6 additions and 3 deletions
+2 -2
View File
@@ -856,7 +856,7 @@ def test_log_level(level, has_output, defaultenv):
assert response.status_code == 200
if has_output[0]:
assert re.match(
r'unknownSocket - - \[.+\] "GET / HTTP/1.1" 200 - "" "python-requests/.+"',
r'unknownSocket - postgrest_test_anonymous \[.+\] "GET / HTTP/1.1" 200 - "" "python-requests/.+"',
postgrest.process.stdout.readline().decode(),
)
@@ -864,7 +864,7 @@ def test_log_level(level, has_output, defaultenv):
assert response.status_code == 404
if has_output[1]:
assert re.match(
r'unknownSocket - - \[.+\] "GET /unknown HTTP/1.1" 404 - "" "python-requests/.+"',
r'unknownSocket - postgrest_test_anonymous \[.+\] "GET /unknown HTTP/1.1" 404 - "" "python-requests/.+"',
postgrest.process.stdout.readline().decode(),
)