Jump to content

[SOLVED] Debug a module in my shop


Rodrigo Chantes P

Recommended Posts

I have done this in a server that I had no access but ftp and BO using prestashop logger. When it comes to time measurement you need to capture timestamp of just right now and store it in a variable. Then after some pieces of code you need to capture another timestamp and calculate the duration easily.

For instance:

// just before an specific part of code
$startTime = time();

// any process that you need to measure
// myProcess();

// after that process is finished
$totalTime = time() - $startTime;

PrestashopLogger::addLog("MyLogFlag --- total time was {$totalTime} second(s)");

Another thing is you can use this PrestashopLogger::addLog($message) any where you want and then check the logs in BO

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...