Magento API Logs

Is there a way to enable API call logging?

We have a third-party application that does not work with our store and wants to receive debugging information. ~ I searched bt did not find anything.

I am using 1.7

+5
source share
3 answers

for a controlled period of time, you can manipulate index.php as follows:

put this code at the end of index.php around the :: run call:

ob_start();
Mage::run($mageRunCode, $mageRunType);

if(preg_match('/api/', $_SERVER['REQUEST_URI'])) {
        Mage::log('<<< request '.$_SERVER['REQUEST_METHOD'].': '.$_SERVER['REQUEST_URI'], null, 'api.log');
        if($_SERVER['REQUEST_METHOD'] == 'POST') {
                Mage::log('<<< '.file_get_contents('php://input'), null, 'api.log');
        }
        Mage::log('>>> '.ob_get_contents(), null, 'api.log');
}

ob_end_flush();

its quick and dirty but for adhoc debugging it works

+7
source

- API. , . PHP , API URL- API. , API, magento API. , .

, , API. http://techcolin.net/2011/11/a-php-proxy-script-for-logging-magento-api-soap-calls/

+1

,

System -> Configuration -> Developer -> Debug -> Profiler -> Yes 

, Magento OOB.

PHP API .

Mage::log() API-, , var/system.log, .

0

All Articles