Class LogReducer
java.lang.Object
io.jenkins.plugins.changeinvestigator.evidence.LogReducer
Reduces a (potentially huge) console log down to a small, bounded set of lines that are
likely relevant to diagnosing a build failure, without ever sending the entire log
anywhere. Secrets are redacted before any line leaves this class.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intHard cap on how many lines of the raw log this reducer will ever read, regardless of config. -
Method Summary
Modifier and TypeMethodDescriptionstatic LogReducer.Resultreduce(BufferedReader reader, int maxChars) Reads fromreader, extracts likely-relevant lines (or the tail of the log if nothing matches), redacts secrets, cleans ANSI/control noise, and bounds the total output tomaxCharscharacters.
-
Field Details
-
MAX_LINES_SCANNED
public static final int MAX_LINES_SCANNEDHard cap on how many lines of the raw log this reducer will ever read, regardless of config.- See Also:
-
-
Method Details
-
reduce
Reads fromreader, extracts likely-relevant lines (or the tail of the log if nothing matches), redacts secrets, cleans ANSI/control noise, and bounds the total output tomaxCharscharacters.- Throws:
IOException
-