FrameworkBenchmarks icon indicating copy to clipboard operation
FrameworkBenchmarks copied to clipboard

Capture database container logs

Open michaelhixson opened this issue 6 years ago • 1 comments

We should capture the docker log output from the database containers at runtime. Currently we don't capture this output anywhere.

These logs would probably contain little to nothing by default, but when used in combination with database config changes, they can be useful for debugging.

For example, if I capture the database container logs and I edit postgresql.conf to have these settings:

log_statement = 'all'
log_destination = 'stderr'

...then I can see every query being executed by the postgres database.

We should write these logs to disk somewhere. It's not too important where they go exactly. Currently we're thinking:

  • If possible, have a separate database log file per [framework, test type] combination.
  • Otherwise, have a separate database log file per framework.

michaelhixson avatar Jul 05 '18 17:07 michaelhixson

Demonstration of how I've done this in the past for debugging people's database queries: https://github.com/michaelhixson/FrameworkBenchmarks/commit/3513992ac0467d029ecadf5068d50163b5c88b7c

michaelhixson avatar Jun 10 '19 19:06 michaelhixson