mirror of
https://github.com/chubin/cheat.sh.git
synced 2024-11-23 02:25:53 +03:00
fec99a7a54
Sometimes there is nothing, sometimes lines are duplicated. Duplicated lines problem appears, because Python root logger handler and Flask's `werkzeug` logger handler both write the same message. `cheat.sh` is hit, because it sets this root logging handler. Normally `werkzeug` doesn't setup its own handler if it sees that there are some handlers that process its messages. This in case of `cheat.sh` resulted in no stderr logging at all. No Exceptions either. Because `werkzeug` catches the exceptions and logs them. Hovewer, sometimes `werkzeug` starts too early, befora app is imported (https://github.com/pallets/werkzeug/issues/1969) and sets its logger anyway, before the app itself, resulting in duplicating lines. In that case app root handler needs to skip lines from `werkzeug`. Kudos to @brandon-rhodes for `logging_tree` awesomeness |
||
---|---|---|
.. | ||
app.py | ||
clean_cache.py | ||
release.py | ||
srv.py |