Opened 11 years ago
Closed 11 years ago
#34441 closed enhancement (duplicate)
Make WP_DEBUG_LOG to match a path
| Reported by: | juliobox | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Bootstrap/Load | Version: | 4.4 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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' ); } }