Refactor the logging facility a bit

This commit is contained in:
KnugiHK
2026-01-24 17:05:14 +08:00
parent 4eed3ca321
commit f920ca82b4
8 changed files with 123 additions and 121 deletions

View File

@@ -9,7 +9,6 @@ from Whatsapp_Chat_Exporter.data_model import ChatStore, Message
from Whatsapp_Chat_Exporter.utility import Device, convert_time_unit
logger = logging.getLogger(__name__)
def messages(path, data, assume_first_as_me=False):
@@ -43,7 +42,7 @@ def messages(path, data, assume_first_as_me=False):
)
pbar.update(1)
total_time = pbar.format_dict['elapsed']
logger.info(f"Processed {total_row_number} messages & media in {convert_time_unit(total_time)}")
logging.info(f"Processed {total_row_number} messages & media in {convert_time_unit(total_time)}")
return data