2

I am facing very strange problem if i using mage log function in controllers file to print any string/varable/array it prints 2 times in log file

Mage::log('string', null, 'mylogfile.log');
Mage::log('$vaiable', null, 'mylogfile.log');
Mage::log('$array', null, 'mylogfile.log');

i don't have any idea about this & i also search internet but no appropriate result.
can any help me why this is happening
because of this i am getting problem in debugging.

  • Please add the code context. – benmarks Jul 29 '15 at 17:12
0

See the apache log: if you put at the beginning

Mage::log("DEBUG test controller init");

and at the end a

Mage::log("DEBUG test controller end");

Do you see them called twice? That would mean that the controller is called twice.

Now, what file are you playing with?

Not the answer you're looking for? Browse other questions tagged or ask your own question.