percy / cli

The Percy CLI is used to interact with, and upload snapshots to, percy.io via the command line.
https://docs.percy.io/docs/cli-overview
70 stars 43 forks source link

Silence chromium download progress log #1160

Open joshkg opened 1 year ago

joshkg commented 1 year ago

When Percy downloads Chromium during asset discovery, the download progress log spams our CI with messages like:

Downloading Chromium 929511...percy] Downloading Chromium 929511 [                    ] 332B/142.9MB 0% 00:00percy] Downloading Chromium 929511 [                    ] 1.7kB/142.9MB 0% 00:00percy] Downloading Chromium 929511 [                    ] 3.0kB/142.9MB 0% 00:00percy] Downloading Chromium 929511 [                    ] 4.4kB/142.9MB 0% 00:34percy] Downloading Chromium 929511 [                    ] 5.7kB/142.9MB 0% 00:26percy] Downloading Chromium 929511 [                    ] 7.1kB/142.9MB 0% 00:21percy] Downloading Chromium 929511 [                    ] 8.4kB/142.9MB 0% 00:17percy] Downloading Chromium 929511 [                    ] 9.7kB/142.9MB 0% 00:15percy]

Is it possible to silence this?

samarsault commented 1 year ago

There is no way to hide only these logs for now. You can set the PERCY_LOGLEVEL env variable using something like cross-env to suppress the logs.

One workaround is skipping the download altogether by downloading it on your CI yourself (ref doc)

joshkg commented 1 year ago

@samarsault thanks for the quick reply -- I will investigate these options!

itsjwala commented 1 year ago

Hey @joshkg 👋

joshkg commented 1 year ago

@itsjwala I've tried a few options now, here's my initial assessment:

Poking around in the logger source, maybe just an option to exclude the logger.progress messaging would be the most exact solution, if anyone wants to address this as an enhancement - I don't know how common this particular logging issue is, perhaps its only an issue on Semaphore CI.