This below is my code
logging.basicConfig(filename='logging2 text', level=logging.INFO,
format='%(levelname)s:%(message)s')
class Employee:
def __init__(self, firstname, lastname):
self.firstname = firstname
self.lastname = lastname
@property
def fullname(self):
return('{} {}'.format(self.firstname, self.lastname))
@property
def email(self):
return('{}@gmail.com'.format(self.fullname))
logging.info('Employee info:\nFullname: {}\nEmail: {}'.format(self.fullname, self.email))
emp1 = Employee('Joe', 'Mama')
When I run the program, it creates the file 'logging2 test' but it records no logs, only a blank file although i've already tell the program to record the logs on line 19, logging.info('Employee info:\nFullname: {}\nEmail: {}'.format(self.fullname, self.email)) really could use some explanation. Thanks