Testing logger and debug

This commit is contained in:
2024-12-10 15:28:00 +01:00
parent 6fd0c5e770
commit 8830e277ec
5 changed files with 55 additions and 8 deletions

23
lib/DB/ContactModel.py Normal file
View File

@@ -0,0 +1,23 @@
from PySide6.QtCore import QAbstractTableModel, QModelIndex, Qt, Slot
from .ContactDAO import ContactDAO
import logging
logger = logging.getLogger()
print(__name__)
class ContactModel:
def __init__(self):
print(f"*** File: {__file__}, __init__()")
super().__init__()
self.__data = self.__getData()
def getContacts(self):
print(f"*** File: {__file__}, getContacts()")
logger.debug("A debug message")
return self.__data
def __getData(self):
print(f"*** File: {__file__}, __getData()")
ContactDAO().getContacts()