Implement the feature to log to file, with support for JSON. (#234)
This allows pgcopydb to log both to the terminal and also to a file, where the format is not adjusted for terminal width (long time format, source file and line always included). Also implements logging in JSON, using a JSON object per line with a static set of attributes that includes all the metadata we have about the log message. The control of this feature set is entirely based on using environment variables, no new command line switch has been introduced. It is possible to log both in plain text with colors on the terminal and to a JSON file at the same time.
parent
267770d3
Please register or sign in to comment