Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Add logging to securedrop-export #17

Merged
merged 3 commits into from
Oct 10, 2019
Merged

Add logging to securedrop-export #17

merged 3 commits into from
Oct 10, 2019

Conversation

emkll
Copy link
Contributor

@emkll emkll commented Sep 26, 2019

Fixes #7

Status

Ready for review

Test Plan

Build and functionally test

  • check out this branch
  • python3 setup.py sdist
  • check out master branch of securedrop-debian-packaging repo (adjacent to this package)
  • PKG_VERSION=0.1.2 PKG_PATH=../securedrop-export/dist/securedrop-export-0.1.2.tar.gz make securedrop-export
  • qvm-copy-to-vm sd-export-usb the built deb and install it in sd-export usb
  • tail -f ~/.securedrop-export/logs/export.log
  • Log information is present in that file

Visual review

Keeping in mind this information will be lost on each reboot, as it will be logged in sd-export-usb, a named DispVM that should last for an entire workstation session

  • The right information is logged, at the right level
  • No sensitive submission information is logged

configure_logging()
except Exception:
msg = "ERROR_LOGGING"
my_sub.exit_gracefully(msg)
Copy link
Contributor

Choose a reason for hiding this comment

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

Careful: my_sub isn't defined at this point, so the exit_gracefully call will raise an exception of its own. flake8 catches this mistake, but we don't run flake8 in CI for this repo—perhaps we should add it. Would be simple enough to copy/paste from e.g. https://github.com/freedomofpress/securedrop-workstation/blob/bbebfc0f0f1fd45bab7956e3d9d4412c434532ca/Makefile#L127-L133

@emkll emkll force-pushed the add-logging branch 2 times, most recently from ccaf9b3 to a3c998c Compare September 27, 2019 13:59
@sssoleileraaa
Copy link
Contributor

lgtm! I see the expected error logs and some useful info logs. This will come in handy when working on printer support too.

@sssoleileraaa sssoleileraaa merged commit 78bcbfe into master Oct 10, 2019
@sssoleileraaa sssoleileraaa deleted the add-logging branch August 27, 2021 19:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export logging
3 participants