Simplest way of outputting debug content into file

silanlin

New Member
I've got an applicaiton with various php scripts. I want to get an idea of how much time it takes for the execution to move from one point to another (there are many such points).I was looking for a simple php line that I can insert without modification, at different spots in my code and get an output file (NOT generated html) which shows something like:\[code\]FILENAME FUNCTION LINENUMBER TIMESTAMP\[/code\]I've started using this:\[code\]file_put_contents('/home/default/public_html/debug.log', __FILE__ . "\t" . __FUNCTION__ . "\t" . __LINE__ . "\t" . microtime(true)."\n", FILE_APPEND);\[/code\]which is good, but are there better ways of doing the same?
 
Back
Top