1
0
mirror of https://github.com/fHDHR/fHDHR_NextPVR.git synced 2025-12-06 10:26:57 -05:00

Merge pull request #73 from deathbybandaid/dev

Use logger for Flask
This commit is contained in:
Deathbybandaid 2020-12-02 11:28:59 -05:00 committed by GitHub
commit 373b5c61a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,10 +39,10 @@ class fHDHR_HTTP_Server():
self.app.after_request(self.after_request)
def before_request(self):
self.fhdhr.logger.debug("")
self.fhdhr.logger.debug("Client %s requested %s Opening" % (request.method, request.path))
def after_request(self, response):
self.fhdhr.logger.debug("")
self.fhdhr.logger.debug("Client %s requested %s Closing" % (request.method, request.path))
return response
def add_endpoints(self, index_list, index_name):
@ -80,7 +80,7 @@ class fHDHR_HTTP_Server():
self.http = WSGIServer((
self.fhdhr.config.dict["fhdhr"]["address"],
int(self.fhdhr.config.dict["fhdhr"]["port"])
), self.app.wsgi_app)
), self.app.wsgi_app, log=self.fhdhr.logger)
try:
self.http.serve_forever()
except KeyboardInterrupt: