Opened 10 years ago
Closed 10 years ago
#34441 closed enhancement (duplicate)
Make WP_DEBUG_LOG to match a path
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 4.4 |
| Component: | Bootstrap/Load | Keywords: | |
| Focuses: | Cc: |
Description
Hello,
i propose to make the possibility for WP_DEBUG_LOG to be a path to a log file like ERRORLOGFILE already is.
False = no log,
True = actuel default path wp-content/debug.log
/home/logs/wp.log = this file!
The patch includes 2 files, code and docs.
Thank you
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
This sounds like a good idea, but needs a bit more accurate logic. Looks like
null,0or1would 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' ); } }