FR: Change EE's logger to use PSR3

April 12, 2018 9:47am

Subscribe [2]
  • #1 / Apr 12, 2018 9:47am

    litzinger's avatar


    614 posts

    … 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, 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.

  • #2 / Apr 13, 2018 3:09pm

    Kevin Cupp's avatar

    Kevin Cupp

    744 posts

    Thanks for the suggestion! Real talk, it’s unlikely this will be a priority for us any time soon, it’s just too much work for not enough impact, but if we end up needing re-implement logging, we can definitely keep it in mind to refer to PSR3 for guidance.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases