Make console output less verbose for api

This commit is contained in:
Arinerron 2018-09-06 21:46:56 -07:00
parent 516d965ad3
commit f10e077896

View File

@ -59,14 +59,9 @@ class API:
} }
for mimetype in mimetypes: for mimetype in mimetypes:
logger.debug(path + ' endswith .' + mimetype + '?')
if path.endswith('.%s' % mimetype): if path.endswith('.%s' % mimetype):
logger.debug('- True!')
return mimetypes[mimetype] return mimetypes[mimetype]
else:
logger.debug('- no')
logger.debug('%s not in %s' % (path, mimetypes))
return 'text/plain' return 'text/plain'
def __init__(self, debug): def __init__(self, debug):
@ -203,11 +198,11 @@ class API:
time.sleep(self._privateDelayTime - elapsed) time.sleep(self._privateDelayTime - elapsed)
''' '''
logger.debug('Serving %s' % path)
self.mimeType = API.guessMime(path) self.mimeType = API.guessMime(path)
self.overrideCSP = True self.overrideCSP = True
logger.debug('Serving %s (mime: %s)' % (path, self.mimeType))
return send_from_directory('static-data/www/ui/dist/', path, mimetype = API.guessMime(path)) return send_from_directory('static-data/www/ui/dist/', path, mimetype = API.guessMime(path))
@app.route('/client/') @app.route('/client/')