I have two different instances of the same server (one for development, one for deployment), built independently but basically the same (same OS, same WordPress version, same content etc.).
However, I’m confused about the configuration: it looks to me like they’re configured the same (except that the deployment server is told not to write errors/warnings to the browser).
Both configurations specify ini_set( 'error_log', '/var/log/wp-debug.log' );
and that file is indeed created by both; however, on one server anything written using error_log(...)
goes to /var/log/wp-debug.log
whereas on the other server, such output instead goes to /var/log/apache2/error.log
(although PHP errors and warnings go to /var/log/wp-debug.log
).
I’ve tried playing with the defined values of WP_DEBUG
, WP_DEBUG_LOG
and WP_DEBUG_DISPLAY
as well as changing what display_errors
is set to via ini_set(...)
but nothing seems to make any difference.
Can I specify somewhere that I want the output of error_log(...)
calls to go to one or other of these logs? (I’d like the output always to go to the Apache error.log
because that extra information I want to use.)