[wp-trac] [WordPress Trac] #38735: Custom PATH for debug.log

WordPress Trac noreply at wordpress.org
Wed Nov 9 18:02:31 UTC 2016


#38735: Custom PATH for debug.log
----------------------------+-----------------------------
 Reporter:  mesaquesoares   |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Customize       |    Version:  4.6.1
 Severity:  normal          |   Keywords:
  Focuses:  administration  |
----------------------------+-----------------------------
 Hi!!
 I am a DevOps, and i like to put every services log on one place, for
 organization, fast debug and security.

 Sow i propose a php constant that define the debug.log place.

 in line 331 of wp-includes/load.php we have  this:
 {{{#!php
 <?php
 ini_set( 'error_log', WP_CONTENT_DIR . '/debug.log' );
 }}}
 if we add this after this block:

 {{{#!php
 <?php

 if( defined('WP_DEBUG_DIR') ) {
    ini_set( 'error_log', WP_DEBUG_DIR . '/debug.log' );
 }

 }}}

 full block
 {{{#!php
 <?php
 ini_set( 'error_log', WP_CONTENT_DIR . '/debug.log' );
 if( defined('WP_DEBUG_DIR') ) {
    ini_set( 'error_log', WP_DEBUG_DIR . '/debug.log' );
 }
 }}}

 and after if we defined this constant '''WP_DEBUG_DIR''' on wp-config.php
 we can successfull set a custom debug.log place

 Thx have a nice day

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


More information about the wp-trac mailing list