question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to turn workbox logging off while running in dev/localhost with v4.0.0-rc.4?

See original GitHub issue

Library Affected: workbox-core

Browser & Platform: Google Chrome v72.0.3626.119 (Official Build) (32-bit) for Windows

Issue: From the release notes, I see that setLogLevel and LOG_LEVELS are removed in v4.0.0 - but while running again localhost there is no way to completely turn off workbox logging.

We do have 3200+ files that are getting into workbox precache - and after using the log filters in Chrome, the empty group statements still remain.

Any other debug/log messages in the app is getting drowned in worbox logs.

Is there a way to turn off logging even on development/local environment?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
philipwaltoncommented, Feb 27, 2019

You can run workbox.setConfig({debug: false}) (docs) to force the production version even on localhost. That’s probably your best bet.

The group filtering issue not working is an annoying bug in DevTools that I believe is being worked on now. You can star it or add a comment to help let the team know it’s important to you: https://bugs.chromium.org/p/chromium/issues/detail?id=363796

2reactions
tvvigneshcommented, Jan 14, 2020

@jeffposnick Hi. May I know how to switch off logging when using CLI config file: https://developers.google.com/web/tools/workbox/modules/workbox-cli

The generated sw.js explicitly says not to edit it but rather change the config file. But, I don’t find any option to switch off logging in the configuration options.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I turn off the workbox browser console messages?
Very simply, I would like to disable the display of the repeated workbox messages that appear in my browser console while ...
Read more >
workbox v4.0.0-rc.4
The latest RC release of Workbox v4 includes the following developer-visible changes, in addition to all the changes from the previous ...
Read more >
Troubleshooting and logging - Chrome Developers
The logging messages. Development builds of Workbox turn logging on by default, whereas production builds turn it off. There are different steps ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found