// Include the JLog class. jimport('joomla.log.log'); // Add the logger. JLog::addLogger( // Pass an array of configuration options array( // Set the name of the log file 'text_file' => 'test.log.php', // (optional) you can change the directory 'text_file_path' => 'somewhere/logs' ) ); // start logging... JLog::add('Starting to log');