[wp-trac] [WordPress Trac] #30934: Create a new API to standardize application logging

WordPress Trac noreply at wordpress.org
Wed Jan 7 03:30:44 UTC 2015


#30934: Create a new API to standardize application logging
--------------------------+-----------------------------
 Reporter:  ericlewis     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 There are moments in WordPress' execution that it would be helpful to have
 application debug logging.

 One that has bitten me hard is
 [https://github.com/WordPress/WordPress/blob/4.1/wp-includes/ms-
 settings.php#L162 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
 [https://core.trac.wordpress.org/ticket/28319#comment:30 dd32 proposed]
 creating a PSR-3 inspired API for logging errors. Let's consider this.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30934>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list