March 2017
-
What is the best way to inject a logger?
March 6, 2017I'm working on several projects right now that I'd like to be able to generate logs from. The problem is that logging isn't required for the code to work, so how do I configure it? I see three possibilities: Required in Constructor use Psr\Log\LoggerInterface; class MyClass {...