Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silence chromium download progress log #1160

Open
joshkg opened this issue Dec 21, 2022 · 4 comments
Open

Silence chromium download progress log #1160

joshkg opened this issue Dec 21, 2022 · 4 comments
Labels
✨ enhancement New feature or request

Comments

@joshkg
Copy link

joshkg commented Dec 21, 2022

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
Copy link
Contributor

samarsault commented Dec 21, 2022

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)

@itsjwala itsjwala added the ✨ enhancement New feature or request label Dec 21, 2022
@joshkg
Copy link
Author

joshkg commented Dec 21, 2022

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

@itsjwala
Copy link
Contributor

itsjwala commented Jan 3, 2023

Hey @joshkg 👋

  • does the link solve your issue?
  • you may use --silent flag to silence these logs or use PERCY_DEBUG env var to whitelist only certain packages to log.

@joshkg
Copy link
Author

joshkg commented Jan 5, 2023

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

  • setting PERCY_LOGLEVEL to warn removes the download progress messaging, but also removes the other info-level messages we'd like to continue seeing (same issue as using --silent flag)
  • moving the download of the chromium browser outside of the Percy install also works. However this is not ideal, as it requires us to monitor browser version changes when the package is upgraded (I could foresee the possibility that we forget the connection between percy & this download and get out of sync in the future)
  • using the PERCY_DEBUG variable to whitelist just core and core:browser like the following value: PERCY_DEBUG="core,core:browser" seems to be the closest to what I'm after -- it adds a line per test of percy messaging we didn't have before. that we don't want, but it maintains the rest of the info level messaging we want to keep, and removes the install debug level (and others) that we don't want to see.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants