… and provide an easy way to change the logging destination, e.g. default to the database, but optionally log to a file.
We have several instances of ee()->logger->developer(”) in our custom add-on’s for jamf.com, which can be changed easily, but if any 3rd party add-ons are also logging to it, we have to modify those add-ons if we want to log to a file so we can use Sumo Logic. Being able to universally change logging destinations via a config option, but retaining a single interface to log messages would be nice.
edit: When I wrote this I was looking at EE3’s codebase, and now I see a File logger service in EE4, but that seems like a missed opportunity to support interoperability being that its a custom logger and doesn’t follow PSR3.