bugreport
bugreport
is a Rust library that helps application developers to automatically collect
information about the system and the environment that users can send along with a bug
report (similar to git bugreport
or ffmpeg … -report
).
Note: This library is in an early stage and the API may change in the future.
Example
The following code
use ;
generates bug report information that looks like this.
Collectors
- Crate information (name and version)
- Operating system (type, name, version)
- Command line (including all arguments)
- Environment variables (e.g.
SHELL
,PATH
, …) - File contents (e.g. config files)
- Command output (e.g.
bash --version
) - Compile time information (profile, target, architecture, cpu features, etc.)
- Current working directory
- Date and time
- User defined collectors
Features
- Markdown export
- Auto-detect
--diagnostic
command-line option or environment variable (like--diagnostic
) - Open report output in editor (instead of printing to stdout, see
git bugreport
) - Ask user for permission to gather information?
- Automatic anonymization of information? (e.g.: remove
/home/username
from paths) - JSON export (?)
Use cases / prior art
ffmpeg
s-report
option- Interesting: "Setting the environment variable FFREPORT to any value has the same effect."
- see also: https://ffmpeg.org/bugreports.html
git bugreport
- https://git-scm.com/docs/git-bugreport
- git version --build-options
grails bugreport