From 43658a92c4add62298af62842bc1fd17ba8ee04b Mon Sep 17 00:00:00 2001 From: KnugiHK <24708955+KnugiHK@users.noreply.github.com> Date: Sun, 14 Dec 2025 21:57:17 +0800 Subject: [PATCH] Replace print with logger in read_vcards_file Changed the contact import message from a print statement to a logger.info call for better logging consistency. --- Whatsapp_Chat_Exporter/vcards_contacts.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Whatsapp_Chat_Exporter/vcards_contacts.py b/Whatsapp_Chat_Exporter/vcards_contacts.py index ba2165d..6baf5ba 100644 --- a/Whatsapp_Chat_Exporter/vcards_contacts.py +++ b/Whatsapp_Chat_Exporter/vcards_contacts.py @@ -1,9 +1,12 @@ -import vobject +import logging import re import quopri from typing import List, TypedDict from Whatsapp_Chat_Exporter.data_model import ChatStore -from Whatsapp_Chat_Exporter.utility import Device +from Whatsapp_Chat_Exporter.utility import CLEAR_LINE, Device + + +logger = logging.getLogger(__name__) class ExportedContactNumbers(TypedDict): @@ -77,7 +80,7 @@ def read_vcards_file(vcf_file_path, default_country_code: str): } contacts.append(contact) - print(f"Imported {len(contacts)} contacts/vcards") + logger.info(f"Imported {len(contacts)} contacts/vcards{CLEAR_LINE}") return map_number_to_name(contacts, default_country_code)