inpsyde / Wonolog

Monolog-based logging package for WordPress.
https://inpsyde.github.io/Wonolog/
MIT License
173 stars 17 forks source link

Add Query Monitor handler. #65

Closed jenkoian closed 1 year ago

jenkoian commented 2 years ago

As Query Monitor is so ubiquitous througout WordPress development and it has it's own neat logging capability it's useful to be able to configure Wonolog to write to the query monitor log.

This enables us to use the same logging code across environments and log to query monitor on the environments we wish. For example, we log to disk for local dev, QM on QA and Staging and New Relic in production.

Handlers should generally be added in userland, however as mentioned with Query Monitor so ubiquitous it may be a nice offering to offer as part of Wonolog.

jenkoian commented 2 years ago

@gmazzap I had no idea there was a 2.x branch 😅 happy to open a new PR against that branch if you'd prefer?

jenkoian commented 2 years ago

@gmazzap have addressed the feedback (thanks) but yeah let me know about whether you would prefer this against 2.x 👍