Logging with PSR-3 to Improve Reusability
Logging is a ubiquitous task; we use logs to track error messages,debug problems, and record important events. Unfortunately, having calls to a logging library scattered throughout our code makes the code dependent on the availability of that library, a clear violation of the Dependency Inversion Principle. In this article, learn how the PSR-3 logger interface allows us to write reusable code that isn’t dependent on any particular logging implementation.
