Joomla! provides the
JLog class for handling log files. In order to use this class we must first import it:
Let's start by exploring the use of
JLog to handle the global error log file. The global error log file is a PHP file generally used to log failed login attempts.
To access the global error log file we obtain a reference using the
$errorLog =& JLog::getInstance();
New entries are appended to the end of the log file and they are derived from associative arrays. The array keys differ depending on the log file; the global error log file uses the following keys:
C-IP keys are automatically populated. In fact we are not required to ...