I'm wondering what the simplest way to enable debugging/verbose mode outputs in a project that involves multiple classes/files. The answer given here: Easier way to enable verbose logging works well in a single script but what might be the best implementation across multiple classes?
I've thought to use the Singleton design pattern to set a single instance of a "Debugger"
which will have a Debugger.log("message")
. Is there a better way to accomplish this?