Skip to main content

Home > @rushstack/terminal > StdioSummarizer

StdioSummarizer class

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Summarizes the results of a failed build task by returning a subset of stderr output not to exceed a specified maximum number of lines.


export declare class StdioSummarizer extends TerminalWritable 

Extends: TerminalWritable


IMPORTANT: This transform assumes that its input was prepared by StderrLineTransform, so that each ITerminalChunk.text item is a single line terminated by a "\n" character.

The IStdioSummarizerOptions.leadingLines and IStdioSummarizerOptions.trailingLines counts specify the maximum number of lines to be returned. Any additional lines will be omitted. For example, if leadingLines and trailingLines were set to 3, then the summary of 16 stderr lines might look like this:

Line 1
Line 2
Line 3
...10 lines omitted...
Line 14
Line 15
Line 16

If the stderr output is completely empty, then the stdout output will be summarized instead.


(constructor)(options)(BETA) Constructs a new instance of the StdioSummarizer class


getReport()(BETA) Returns the summary report.