I want to create my custom logger class
import logging
class mylooger():
   def __init__(module_name):
       logger=logging.getlogger(module_name)
And i want use logger in my main file and two other files
main.py
test1.py
test2.py
i want to decide my logfile path in main.py and keep main.py, test1.py and test2.py file log in same file.
Now suppose later i want to import test1.py and test2.py in some other file e.g main1.py. So i want to decide my logfile path from main1.py and keep main1.py, test1.py and test2.py log in same file.


loggeris just a local variable to__init__, andgetLoggeralready returns a reference to a uniqueLoggerobject based on its argument.