3 ms·
Imagine you want to simplify the code, and you hate passing values around, so you write a framework that allows you to write something like: @GetMeALogger(
by logicchains 8y ago
Imagine you want to simplify the code, and you hate passing values around, so you write a framework that allows you to write something like:
@GetMeALogger(andCallIt=loggy)
void foo() {
loggy.logError("no cheese");
}
Where @GetMeALogger does some magic at compile time to pipe in some kind of logger class based on various config options. Then to unit test it, you use different config than production.