When logs for response from services are called the log file is cleared. This means its impossible to work with logs for the whole process of requesting a resource and parsing the result.
A better solution would be to have 2 log files:
For logs made normally
For logs called with service response
All service responses are sent to the blog's admin-ajax.php page so testing:
if(defined('ADMIN_AJAX'))
will allow the logging function to know which log file to use
When logs for response from services are called the log file is cleared. This means its impossible to work with logs for the whole process of requesting a resource and parsing the result.
A better solution would be to have 2 log files:
All service responses are sent to the blog's
admin-ajax.php
page so testing:will allow the logging function to know which log file to use