Skip to content

Add an error-only log file and a level for the log file - #80

Open
teknogeek0 wants to merge 1 commit into
feat/logging-subprocess-linesfrom
feat/logging-error-file
Open

teknogeek0 wants to merge 1 commit into
feat/logging-subprocess-linesfrom
feat/logging-error-file

Conversation

@teknogeek0

Copy link
Copy Markdown
Collaborator

Builds on #78. The base is feat/logging-subprocess-lines, so this diff shows only this change. Retarget to main after #76, #77, and #78 merge.

  • PGCOPYDB_LOG_ERROR_FILENAME writes ERROR and FATAL records to their own file, in the format that PGCOPYDB_LOG_JSON_FILE selects. The file is appended to, not emptied, so a --resume run keeps the errors of earlier runs.
  • PGCOPYDB_LOG_FILE_LEVEL sets the lowest level written to PGCOPYDB_LOG_FILENAME. Without it, the file follows the standard error level as before. An unknown level name stops pgcopydb with exit code 1.

PGCOPYDB_LOG_ERROR_FILENAME writes ERROR and FATAL records to their own
file, which is appended to so that a resume keeps earlier errors.
PGCOPYDB_LOG_FILE_LEVEL sets the lowest level for PGCOPYDB_LOG_FILENAME,
which otherwise follows the standard error level.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant