|
|
5 years ago | |
|---|---|---|
| .github/workflows | 5 years ago | |
| docs | 5 years ago | |
| sysaudit | 5 years ago | |
| tests | 5 years ago | |
| .gitignore | 5 years ago | |
| LICENSE | 5 years ago | |
| README.md | 5 years ago | |
| README.rst | 5 years ago | |
| build.py | 5 years ago | |
| poetry.lock | 5 years ago | |
| pyproject.toml | 5 years ago | |
Backport module of sys.audit and sys.addaudithook from Python 3.8.
Note: This module does not backport any of the built-in audit events.
pip install sysaudit
sysaudit can be used as a drop-in replacement for sys.audit and sys.addaudithook.
import sysaudit
def hook(event, args):
print("Event:", event, args)
sysaudit.addaudithook(hook)
sysaudit.audit("event_name", 1, 2, dict(key="value"))
# Event: event_name (1, 2, {'key': 'value'})