fix: scope log filenames by service under root logs dir
This commit is contained in:
@@ -83,7 +83,7 @@ def test_exception_handler_logs_stack_and_sends_500(tmp_path: Path) -> None:
|
||||
assert response.status_code == 500
|
||||
assert response.json()["detail"] == "Internal Server Error"
|
||||
|
||||
error_entries = _read_json_lines(Path(tmp_path) / "errors" / "error.log")
|
||||
error_entries = _read_json_lines(Path(tmp_path) / "errors" / "app.error.log")
|
||||
assert error_entries
|
||||
entry = error_entries[-1]
|
||||
assert entry["level"] == "error"
|
||||
@@ -116,7 +116,7 @@ def test_invalid_request_id_is_replaced_and_used_in_error_context(
|
||||
response_request_id = response.headers["X-Request-ID"]
|
||||
assert response_request_id != "bad"
|
||||
|
||||
error_entries = _read_json_lines(Path(tmp_path) / "errors" / "error.log")
|
||||
error_entries = _read_json_lines(Path(tmp_path) / "errors" / "app.error.log")
|
||||
assert error_entries
|
||||
entry = error_entries[-1]
|
||||
assert entry["request_id"] == response_request_id
|
||||
|
||||
Reference in New Issue
Block a user