[wp-trac] [WordPress Trac] #34441: Make WP_DEBUG_LOG to match a path

WordPress Trac noreply at wordpress.org
Mon Oct 26 15:32:05 UTC 2015


#34441: Make WP_DEBUG_LOG to match a path
-------------------------+------------------------------
 Reporter:  juliobox     |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by SergeyBiryukov):

 This sounds like a good idea, but needs a bit more accurate logic. Looks
 like `null`, `0` or `1` would be treated as a path now.

 Something like this might work:
 {{{
 if ( WP_DEBUG_LOG ) {
         ini_set( 'log_errors', 1 );
         if ( is_string( WP_DEBUG_LOG ) ) {
                 ini_set( 'error_log', WP_DEBUG_LOG );
         } else {
                 ini_set( 'error_log', WP_CONTENT_DIR . '/debug.log' );
         }
 }
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34441#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list