jimport('joomla.log.log'); //import this file on top of the file //write db log code inside your function JLog::addLogger( array( //Sets file name 'text_file' => 'com_test.errors.php' ), //Sets all JLog messages to be set to the file JLog::ALL, //Chooses a component name 'com_test' ); //insertion code :- if(!$db->insertObject($table_name, $final_array, 'id')){ $logEntry = $db->stderr(); //logentry variable // Log my extension errors only. JLog::add($logEntry, JLog::WARNING, 'com_test'); return false; }
Logs shall be stored in yoursiteroot/logs/com_test.errors.php
When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn't miss them.