I created my own simple log class that uses COM interoperability to redirect to the company's standard logger. I would like to instantiate a registrar at the beginning of my script, and then use this registrar to allow all modules in my script to register centrally.
Is there an idiomatic way to share this instance of the logger between all modules without specifically adding the logger parameter to the constructor of each class that needs to be registered?
Should I use a global variable or singleton, or is there another recommended way to access the log between modules?
source share