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.

closed as off-topic by Marius Aug 4 '15 at 12:37

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on problems in code you've written must describe the specific problem and include valid code to reproduce it. For help writing short, self-contained syntactically-valid examples, see: http://sscce.org/" – Marius
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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.