File: D:/HostingSpaces/PvdBoogaard/indoorski.nl/backup/oude-site/cms/lib/log.php
<?php
$GLOBALS['AL_CFG']['EnableLogging'] = 1;
if(isset($GLOBALS['AL_CFG']['EnableLogging']) && GetConfigBoolean('EnableLogging') && NOT_INSTALLED === false){
IWP::GetLib('interspire_log/interspire_log');
/**
* Returns an instance of Interspire_Log
*
* @return Interspire_Log
*/
function &GetLogSystem()
{
static $logsystem = null;
if (is_null($logsystem)) {
$logsystem = new Interspire_Log(true, true);
$logsystem->SetAutoPrune();
$logsystem->SetGeneralLogSize(500);
$logsystem->SetAdminLogSize(500);
// log which parts of the query string?
// can be an array or a singular item.
$logsystem->SetLogActionStrings(array('ToDo', 'w', 'BackupFile'));
// add whatever extra log types are needed.
// these are on top of the built in types of 'php' and 'sql'.
$logsystem->SetValidLogTypes();
// set the types of errors/reports we're actually going to save.
$logsystem->SetLogTypes(array('sql','php'));
$db = &GetDatabase();
// need to connect the database to the log system so it can do it's work.
// it's handled by reference inside the SetDb method.
$logsystem->SetDb($db);
$db->ErrorCallback = array(&$logsystem, "LogSQLError");
$logsystem->SetSeverities('all');
}
return $logsystem;
}
// then set the error handler.
set_error_handler('HandlePHPErrors');
} else {
// don't show the notices!
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
}
?>