Skip to content

Commit

Permalink
docker-postgres: centralise logging configuration (#1189)
Browse files Browse the repository at this point in the history
Clean up changes introduced in #1175 / f5e8f6e:

* use create-docker-databases --log flag
* remove logging settings duplicated in Makefile
* add log_parameter_max_length to create-docker-databases.js
  • Loading branch information
alxndrsn authored Oct 2, 2024
1 parent 404a3a0 commit 99174aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,8 @@ lint: node_version
run-docker-postgres: stop-docker-postgres
docker start odk-postgres14 || (\
docker run -d --name odk-postgres14 -p 5432:5432 -e POSTGRES_PASSWORD=odktest postgres:14.10-alpine \
postgres -c log_statement=all -c log_destination=stderr -c log_parameter_max_length=80 \
&& sleep 5 \
&& node lib/bin/create-docker-databases.js \
&& node lib/bin/create-docker-databases.js --log \
)

.PHONY: stop-docker-postgres
Expand Down
1 change: 1 addition & 0 deletions lib/bin/create-docker-databases.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const { log } = program.opts();
await dbmain.raw("alter system set log_destination to 'stderr';");
await dbmain.raw('alter system set logging_collector to on;');
await dbmain.raw("alter system set log_statement to 'all';");
await dbmain.raw('alter system set log_parameter_max_length to 80');
await dbmain.raw('select pg_reload_conf();');
}

Expand Down

0 comments on commit 99174aa

Please sign in to comment.