Skip to content

Optionally log verbose output to a file instead of stdout#391

Merged
jatoben merged 5 commits into
masterfrom
verbose-log-to-file
Apr 23, 2018
Merged

Optionally log verbose output to a file instead of stdout#391
jatoben merged 5 commits into
masterfrom
verbose-log-to-file

Conversation

@jatoben

@jatoben jatoben commented Apr 21, 2018

Copy link
Copy Markdown
Contributor

Verbose logging is super helpful for debugging backup problems, but writing all verbose output to stdout means that it can't easily be enabled if stdout should remain easily readable or mailable. For example, an admin might like to receive an email via cron after a backup has completed, with the text showing the backup steps and confirming when the backup run finished.

This PR adds a GHE_VERBOSE_LOG setting, which may be pointed to a file that the verbose output will be written to. If a backup fails, the log can then be used to investigate the problem further.

/cc @snh @terrorobe

@jatoben jatoben requested a review from a team April 21, 2018 03:49
Comment thread backup.config-example Outdated
# When verbose output is enabled with `-v`, it's written to stdout by default. If
# you'd prefer it to be written to a separate file, set this option.
#
# GHE_VERBOSE_LOG="/var/log/backup-verbose.log"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: 🔥 the space to be consistent with the other commented-out examples.

@gnawhleinad gnawhleinad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the nit comment, looks good to me!

@lildude lildude left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@snh snh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great improvement ✨

@jatoben jatoben merged commit 457f36a into master Apr 23, 2018
@jatoben jatoben deleted the verbose-log-to-file branch April 23, 2018 17:13
@lildude lildude mentioned this pull request May 9, 2018
dooleydevin pushed a commit that referenced this pull request Aug 16, 2023
…p-restore-secret-scanning-encryption-keys

Backport 351 for 3.9: Backup and restore secret scanning encrypted secrets encryption keys
@dooleydevin dooleydevin mentioned this pull request Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants