Skip to content

Commit

Permalink
Reduce socket.io log chatter (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtlynch committed Aug 26, 2020
1 parent d3b250b commit fdf99b6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
# Location of file path at which to write keyboard HID input.
keyboard_path = os.environ.get('KEYBOARD_PATH', '/dev/hidg0')

# Socket.io logs are too chatty at INFO level.
if not debug:
logging.getLogger('socketio').setLevel(logging.ERROR)
logging.getLogger('engineio').setLevel(logging.ERROR)

app = flask.Flask(__name__, static_url_path='')
# TODO(mtlynch): Ideally, we wouldn't accept requests from any origin, but the
# risk of a CSRF attack for this app is very low. Additionally, CORS doesn't
Expand Down

0 comments on commit fdf99b6

Please sign in to comment.