From 62a0cc62765b7e2200f0ba4c4946bfd36ea0b1c0 Mon Sep 17 00:00:00 2001 From: Simone Margaritelli Date: Tue, 5 Nov 2019 14:03:15 +0100 Subject: [PATCH] fix: suppress flask logging --- pwnagotchi/ui/web.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pwnagotchi/ui/web.py b/pwnagotchi/ui/web.py index 8eae39dc..dbe5dd4a 100644 --- a/pwnagotchi/ui/web.py +++ b/pwnagotchi/ui/web.py @@ -1,9 +1,12 @@ -import re import _thread import secrets from threading import Lock -import shutil import logging +import os + +# https://stackoverflow.com/questions/14888799/disable-console-messages-in-flask-server +logging.getLogger('werkzeug').disabled = True +os.environ['WERKZEUG_RUN_MAIN'] = 'true' import pwnagotchi from pwnagotchi.agent import Agent