On my Linux Ubuntu system I run apache2 web server in the context of a PHP based web application. phpinfo() reports the following
error_log /opt/unetlab/data/Logs/php_errors.txt
I.e. error_log() is supposed to send messages to /opt/unetlab/data/Logs/php_errors.txt file.
On PHP code that handles the application's REST API, I use error_log() function to log some debugging info.
The weird thing is that sometimes error_log() doesn't write anything on the log file. Nevertheless error_log() called from other PHP code's files (e.g.functions.php) works as a charm.
Which could be the problem ?