Currently outputting to a file via \o disables the console output, however i often find
myself wanting to both log the results & see them in the terminal too #1424
This patch would add a cli arg --log-file, behaving as the same option in psql* + a
\log-file special command to enable/disable it from the console
Maybe this is just useful for me and not worth adding but thought i'd submit it anyway,
i'll update changelog, etc later if you decide it's ok to merge
Checklist
[x] I've added this contribution to the changelog.rst.
[x] I've added my name to the AUTHORS file (or it's already there).
[x] I installed pre-commit hooks (pip install pre-commit && pre-commit install), and ran black on my code.
[x] Please squash merge this pull request (uncheck if you'd like us to merge as multiple commits)
Description
Currently outputting to a file via \o disables the console output, however i often find myself wanting to both log the results & see them in the terminal too #1424
This patch would add a cli arg
--log-file
, behaving as the same option inpsql
* + a \log-file special command to enable/disable it from the console* https://www.postgresql.org/docs/current/app-psql.html#APP-PSQL-OPTION-LOG-FILE
Maybe this is just useful for me and not worth adding but thought i'd submit it anyway, i'll update changelog, etc later if you decide it's ok to merge
Checklist
changelog.rst
.AUTHORS
file (or it's already there).pip install pre-commit && pre-commit install
), and ranblack
on my code.