DataDog / datadog-ci

Use Datadog from your CI.
https://datadoghq.com
Apache License 2.0
128 stars 55 forks source link

Add silent mode to `datadog-ci sourcemaps upload` #1056

Open jakub-g opened 1 year ago

jakub-g commented 1 year ago

Feature request description

Currently, datadog-ci sourcemaps upload logs a line in output for every single file it uploads. If there's 1000 files uploaded, it will log 1000 lines, which is too much.

Solution

It would be nice to have a "silent" mode (name TBD) which only logs warnings/errors and the summary

For example, with a --verbose flag which defaults to true, and can be disabled via --no-verbose (negation is handled by clipanion):

Alternatively to have better control: have a param like --log-level which can more fine-grained (log, warn, error, default: log) and perhaps a separate --log-summary boolean, default: true.

Additional context

No response

Command

sourcemaps

jakub-g commented 1 year ago

The problem I'm trying to solve:

In GitLab, if logs are too long, they get truncated in GitLab web interface; then you have a header like Showing last 499.79 KiB of log - [Complete Raw] with a link to raw log which is a TXT file, which is difficult to read, because it doesn't strip ascii escape codes, so it's a lot of "black text with escape codes, on white background" lines.

Apart from not supporting colors, and not stripping escape codes, raw logs obviously do not support "collapsable sections". This makes comparing two logs from two CI jobs difficult (super long outputs, no colors, and you can't compare timings of "sections" which is a built-in feature of GitLab)