refactor: simplify logger middleware

This commit is contained in:
Wolfgang Walther
2022-01-05 11:01:54 +01:00
committed by Wolfgang Walther
parent cde9cd4ab7
commit 826ae7459a
7 changed files with 73 additions and 54 deletions
+6
View File
@@ -73,3 +73,9 @@ create function reload_pgrst_config() returns void as $_$
begin
perform pg_notify('pgrst', 'reload config');
end $_$ language plpgsql ;
create or replace function raise_bad_pt() returns void as $$
begin
raise sqlstate 'PT40A' using message = 'Wrong';
end;
$$ language plpgsql;
+1 -4
View File
@@ -816,10 +816,7 @@ def test_admin_live_dependent_on_main_app(defaultenv):
def test_log_level(level, has_output, defaultenv):
"log_level should filter request logging"
env = {
**defaultenv,
"PGRST_LOG_LEVEL": level
}
env = {**defaultenv, "PGRST_LOG_LEVEL": level}
with run(env=env) as postgrest:
response = postgrest.session.get("/")