SecureDrop Qubes logging scripts
This is a Python module and qrexec service for logging in Qubes for SecureDrop.
How to use/try this?
In our example, we will use a vm named logging for storing logs, and we will use workvm to send in logs to the logging vm.
- Create a file
dom0with the following content.
workvm logging allow @anyvm @anyvm deny
In logging vm
Add the following content to
and then place
securedrop-log script to
/usr/sbin/ directory and make sure that
it is executable.
To use from any Python code in workvm
Here is an example code using Python logging
import logging from securedrop_log import SecureDropLog def main(): handler = SecureDropLog("workvm", "proxy-debian") logging.basicConfig(level=logging.DEBUG, handlers=[handler]) logger = logging.getLogger("example") logger.info("kushal says it works") if __name__ == "__main__": main()
The journalctl example
You will need
python3-systemd package for the same.
The code is in
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.