LogSanitizer

Properties

Link copied to clipboard
const val MAX_BODY: Int = 500

Functions

Link copied to clipboard
fun residue(text: String, keep: Set<String> = emptySet()): List<String>

Findings left in text by a second pass written apart from the rules that clean it.

Link copied to clipboard
fun sanitize(raw: String, keep: Set<String> = emptySet()): Sanitized
Link copied to clipboard
fun sanitizeDiff(raw: String, keep: Set<String> = emptySet()): Sanitized

Keeps file headers, hunk positions and changed lines of a unified diff; context lines, blob ids and the text after a hunk header are dropped before the same rules run.

Link copied to clipboard
fun sanitizeValue(value: String, keep: Set<String> = emptySet()): Sanitized

Sanitizes one text value, such as a step name or a JSON string, with the same rules.