refactor: simplify logger middleware

This commit is contained in:
Wolfgang Walther
2022-06-03 22:19:16 -05:00
committed by Steve Chavez
parent 7272d8894c
commit ce578ec1b8
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
@@ -743,10 +743,7 @@ def test_db_prepared_statements_disable(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("/")