I'm somewhat confused working with @staticmethods. My logger and configuration methods are called n times, but I have only one call.
n is number of classes which import the loger and configuration class in the subfolder mymodule. What might be my mistake mistake?
### __init__.py ###
from mymodule.MyLogger import MyLogger
from mymodule.MyConfig import MyConfig
##### my_test.py ##########
from mymodule import MyConfig,MyLogger
#Both methods are static
key,logfile,loglevel = MyConfig().get_config('Logging')
log = MyLogger.set_logger(key,logfile,loglevel)
log.critical(time.time())
#Output
2013-05-21 17:20:37,192 - my_test - 17 - CRITICAL - **********.19
2013-05-21 17:20:37,192 - my_test - 17 - CRITICAL - **********.19
2013-05-21 17:20:37,192 - my_test - 17 - CRITICAL - **********.19
2013-05-21 17:20:37,192 - my_test - 17 - CRITICAL - **********.19