This commit is contained in:
2024-08-01 17:58:40 +02:00
parent 3a02846a17
commit 167fe59456
+4 -2
View File
@@ -20,6 +20,8 @@ prepped_tracks = {
"prio":"", "prio":"",
"jingles":"" "jingles":""
} }
logger = logging.getLogger("discord")
class QueryControl: class QueryControl:
""" """
This class `QueryControl` is used to manage queries with information about the author, UUID, This class `QueryControl` is used to manage queries with information about the author, UUID,
@@ -29,7 +31,7 @@ class QueryControl:
self.author = query_author self.author = query_author
self.uuid = query_uuid self.uuid = query_uuid
self.content = query_content self.content = query_content
self.logger = uplogger self.logger = logging.getLogger("discord")
self.stop = False self.stop = False
self.ctx = ctx self.ctx = ctx
self.logger.info( self.logger.info(
@@ -43,7 +45,6 @@ def log_radio_tracks():
record = json.loads(request.data) record = json.loads(request.data)
app.logger.info(record) app.logger.info(record)
app.logger.info("DATA RECEIVED") app.logger.info("DATA RECEIVED")
incoming_q.put(record)
return jsonify("SUCCESS") return jsonify("SUCCESS")
@@ -145,6 +146,7 @@ def comm_subroutine(logger):
the provided code snippet, the logger is used to log messages at the "info" level the provided code snippet, the logger is used to log messages at the "info" level
""" """
#logger.setLevel(logging.DEBUG) #logger.setLevel(logging.DEBUG)
logging.getLogger("discord")
logger.info("Started") logger.info("Started")
threads = [] threads = []
#threads.append(threading.Thread(target=flask_debug, args=(logger,))) #threads.append(threading.Thread(target=flask_debug, args=(logger,)))