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

remove werkzeug url print statements by default? #382

Closed
chriddyp opened this issue Sep 12, 2018 · 2 comments
Closed

remove werkzeug url print statements by default? #382

chriddyp opened this issue Sep 12, 2018 · 2 comments

Comments

@chriddyp
Copy link
Member

In many of my projects, I turn off the URL print statements with:

# Remove URL route logging
logging.getLogger('werkzeug').setLevel(logging.ERROR)

Should we do the same in Dash? Some thoughts:

  • If we do it, we'll need a way to make it overridable in case users actually do want it. That is, placing it in run_server might be too late.
  • Sometimes I find these statements useful when the dash is autorestarting and I'm refreshing the page. When the server has finished restarting, I'll see a flurry of print statements and I know that I'm ready to check out the web site. Of course, hopefully hot-reloading solves this in a more elegant way.
  • The URLs themselves aren't that useful since all of the callbacks are just POST /_dash-update-component. We could make more useful debugging statements like -> 'my-graph.figure start', -> 'my-graph.figure.end` as part of a default dev tools / environment thing
@T4rk1n
Copy link
Contributor

T4rk1n commented Sep 12, 2018

Of course, hopefully hot-reloading solves this in a more elegant way.

Hot reload in #362 also adds a bunch of log since it's a requests loop. I think we should definitely remove them when hot-reload is activated.

If we do it, we'll need a way to make it overridable in case users actually do want it. That is, placing it in run_server might be too late.

Please have a look at #369, @ned2 had the same kind of concern. I put the dev tools activation in a separate method. I think the logs should be activated in production, but not when the application is started via run_server so it could go in the activate_dev_tools method.

@T4rk1n
Copy link
Contributor

T4rk1n commented Sep 25, 2018

I added the option to remove the logs in #362.

@T4rk1n T4rk1n mentioned this issue Oct 8, 2018
@T4rk1n T4rk1n closed this as completed Nov 29, 2018
HammadTheOne pushed a commit to HammadTheOne/dash that referenced this issue May 28, 2021
HammadTheOne pushed a commit that referenced this issue Jul 23, 2021
AnnMarieW pushed a commit to AnnMarieW/dash that referenced this issue Jan 6, 2022
Insert style-loader loaded CSS at top of <head/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants