I read some where “Quality is not a product.. it is a process 😉 ”
I think process is hard-work we do and product is final result we get.
But how we make our process to get a good product, as a LAMP developer I think track processes “Debug Log” is good sort of tool for monitoring programs.
Trouble shooting is quite simple with Log Files. Log file can be used with analysis tools, it’s possible to get a good idea of where errors are coming from, how often errors return.
Here you can see a simple PHP script to trace PHP programs…
function debugLog($log, $text)
$log_dir = dirname($log);
if( !file_exists($log_dir) or !is_dir($log_dir) or !is_writable($log_dir) )
$write_mode = ‘w’;
if( file_exists($log) && is_file($log) && is_writable($log) )
$write_mode = ‘a’;
if( !$handle = fopen($log, $write_mode) )
if( fwrite($handle, $text. “\n”) == FALSE )
We can’t imagine processes without Log File 😉