Make WordPress Core

Opened 5 years ago

Last modified 12 months ago

#30934 assigned enhancement

Create a new API to standardize application logging

Reported by: ericlewis Owned by: nacin
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:


There are moments in WordPress' execution that it would be helpful to have application debug logging.

One that has bitten me hard is multisite redirects when the current blog can't be initialized properly. It would be great to be able to look at a log somewhere that tells me [error] No site found for ericandrewlewis.com /srv/www/wordpress/wp-includes/ms-settings.php:162.

This is just one instance, but opens up a discussion of a consistent API that we can use, both internal to core and in plugins / themes for application logs.

#28319 was a similar request (Add hook to WP_Error for logging and report purposes), but missed the point that WP_Error is a standardized error return value from a function, and not necessarily an application error. However, from that ticket dd32 proposed creating a PSR-3 inspired API for logging errors. Let's consider this.

Change History (6)

#1 @ericlewis
5 years ago

  • Type changed from defect (bug) to enhancement

#2 @nacin
5 years ago

  • Owner set to nacin
  • Status changed from new to assigned

I proposed something along these lines at the community summit and I'm working on a more complete proposal for this. Give me a few days.

This ticket was mentioned in Slack in #core by eric. View the logs.

5 years ago

This ticket was mentioned in Slack in #core by eric. View the logs.

5 years ago

#5 @ocean90
4 years ago

#37221 was marked as a duplicate.

Note: See TracTickets for help on using tickets.