Skip to content

remove werkzeug url print statements by default? #382

Closed

Description

@chriddyp

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

Activity

  1. T4rk1n commented on Sep 12, 2018

    @T4rk1n
    Contributor

    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.

  2. T4rk1n commented on Sep 25, 2018

    @T4rk1n
    Contributor

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

  3. added a commit that references this issue on Jul 23, 2021
  4. added a commit that references this issue on Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions