Добавил имя юзера бд и таблицу в вывод лога
This commit is contained in:
parent
8359c8f9b9
commit
9531e180c8
@ -163,7 +163,7 @@ class Endpoint(Thread):
|
||||
database=self.config["database"]["db-name"]
|
||||
) as connection:
|
||||
query = f"insert into `{self.db_table}` ({self.db_col_names}) values ({vals_str});"
|
||||
journal.log(f"Executing query: {query}")
|
||||
journal.log(f"[{self.config['database']['db-user']}:{self.db_table}] Executing query: {query}")
|
||||
with connection.cursor() as cursor:
|
||||
cursor.execute(query)
|
||||
|
||||
@ -198,7 +198,7 @@ class Endpoint(Thread):
|
||||
self.__insert_db_row(row)
|
||||
last_row = row
|
||||
except Exception as ex:
|
||||
journal.log(f"Exception: {ex}")
|
||||
journal.log(f"[{self.config['database']['db-user']}:{self.db_table}] Exception: {ex}")
|
||||
|
||||
# вычислим время до следующего опроса и подождем
|
||||
# время следующего опроса
|
||||
|
Loading…
x
Reference in New Issue
Block a user