Package slash.common.log
Class DiagnosticReport
java.lang.Object
slash.common.log.DiagnosticReport
An allowlist-only diagnostic payload assembled from an uncaught
Throwable
plus the runtime environment. It is rendered as a stable JSON object so a crash
arrives as a full root-cause chain and environment instead of a screenshot of a
truncated dialog.
Only known fields are extracted; free text is never scraped. The one unavoidable
exception is the cause chain and stack trace, which are needed for root-cause
diagnosis yet can embed absolute file paths (a FileNotFoundException on an
opened document, say). Those paths would reveal the OS user name and document
names, so scrub(java.lang.String) replaces the known user.home and user.name
values with placeholders before the payload is spooled or sent. Route/track
contents, file names beyond what a path segment carries, and any stable identifier
are still never captured.
- Author:
- Christian Pesch
-
Constructor Summary
ConstructorsConstructorDescriptionDiagnosticReport(String threadName, Throwable throwable, String appVersion, String build) -
Method Summary
-
Constructor Details
-
DiagnosticReport
-
-
Method Details
-
toJson
Renders the report as a stable JSON object withschema_versionfirst, so the wire format can evolve. Emission is dependency-free.
-