BE: mylog() better code radability

Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
jokob-sk
2025-11-25 07:54:17 +11:00
parent fa9fc2c8e3
commit 139447b253
26 changed files with 95 additions and 431 deletions

View File

@@ -295,9 +295,7 @@ class NotificationInstance:
(f"-{minutes} minutes", tz_offset),
)
mylog(
"minimal", ["[Notification] Notifications changes: ", self.db.sql.rowcount]
)
mylog("minimal", ["[Notification] Notifications changes: ", self.db.sql.rowcount])
# clear plugin events
self.clearPluginEvents()

View File

@@ -31,10 +31,7 @@ class UserEventsQueueInstance:
Returns an empty list if the file doesn't exist.
"""
if not os.path.exists(self.log_file):
mylog(
"none",
["[UserEventsQueueInstance] Log file not found: ", self.log_file],
)
mylog("none", ["[UserEventsQueueInstance] Log file not found: ", self.log_file],)
return [] # No log file, return empty list
with open(self.log_file, "r") as file:
return file.readlines()