rushstack icon indicating copy to clipboard operation
rushstack copied to clipboard

[terminal] Feature Request: Add a property to indicate the minimum accepted message severity

Open dmichon-msft opened this issue 10 months ago • 1 comments
trafficstars

Summary

Currently various libraries and applications that use terminal.writeVerboseLine and similar have no way of knowing if the information will ever make it to a file or the user. If the ITerminal could be inspected to determine the minimum severity of messages that will be visible, the effort of constructing data that is only visible with verbose logging could potentially be skipped where it will not be retained.

Since ultimately the authority on message severity comes from the underlying ITerminalProvider implementations/instances, this information would need to be surfaced there and aggregated inside of ITerminal.

As a specific example, heft-lint-plugin performs a bunch of work to compute ESLint rule timings, but that information is only exposed when running with --verbose: https://github.com/microsoft/rushstack/blob/7aa7b9f8943359b660b5f563a8496b738b6e4f40/heft-plugins/heft-lint-plugin/src/Eslint.ts#L184-L199

dmichon-msft avatar Dec 30 '24 22:12 dmichon-msft