Skip to content

Rendering and Output

darkstar edited this page Oct 3, 2026 · 2 revisions

Rendering & Output

Diagnostic construction stays independent from presentation: the same data renders anywhere.

🖨️ Built-in renderers

Output Renderer
Rich terminal TerminalRenderer
Plain text PlainRenderer
Compiler-style text CompilerTextRenderer
JSON JsonRenderer
Markdown MarkdownRenderer
HTML (html feature) HTML renderer
Audit transcript AuditTranscriptRenderer
GitHub Actions / delta annotations GithubActionsRenderer, GithubActionsDeltaRenderer
SARIF 2.1.0 SarifRenderer
use diagprint::render::{
    AuditTranscriptRenderer, CompilerTextRenderer, GithubActionsDeltaRenderer,
    GithubActionsRenderer, JsonRenderer, MarkdownRenderer, PlainRenderer,
    Renderer, SarifRenderer, TerminalRenderer,
};

The terminal renderer draws secondary labels differently so related context never looks like an extra primary failure. CI-specific output is covered on CI & Code Scanning.

🗂️ Rotation

File reports support size-based, hourly and daily rotation plus retention cleanup:

use diagprint::{RotationCadence, RotationPolicy};

let policy = RotationPolicy {
    cadence: RotationCadence::Daily,
    ..Default::default()
};

🗜️ Compression

With the compression feature, reports can be written as gzip or Zstandard:

use diagprint::Compression;
// Compression::Gzip
// Compression::Zstd

🎨 Styling

Colours and themes, including the Cybercore palette, are on Themes & Documentation. color(false) always wins and disables ANSI styling.

← 🎯 Diagnostics & Sources  ·  🚦 CI & Code Scanning →

🩺 diagprint

⚡ Start

🧱 Build

📤 Ship

🔧 Fix

🔬 Investigate

🛠️ Project


🌐 Site · 📖 docs.rs · 📦 crates.io

Clone this wiki locally