Added marginal logger changes

This commit is contained in:
Abel Hoogeveen 2019-01-17 14:14:31 +01:00
parent 172bed55b9
commit 8fc17c2a91
No known key found for this signature in database
GPG Key ID: 96C2234920BF4292
3 changed files with 7 additions and 4 deletions

View File

@ -117,6 +117,9 @@ class Core
// Fix Apache bug where CWD is changed upon shutdown
chdir(self::$cwd);
// Log the shutdown
Logger::logInfo("Shutting FuzeWorks down gracefully");
// Fire the Shutdown event
$event = Events::fireEvent('coreShutdownEvent');

View File

@ -218,7 +218,7 @@ class Logger {
if ($error !== null) {
// Log it!
$thisType = self::getType($error['type']);
$LOG = array('type' => $error['type'],
$LOG = array('type' => (!is_null($thisType) ? $thisType : 'ERROR'),
'message' => $error['message'],
'logFile' => $error['file'],
'logLine' => $error['line'],

View File

@ -180,7 +180,7 @@ class Plugins
$h->init();
// And log it
Factory::getInstance()->logger->log('Loaded Plugin Header: \'' . $pluginName . '\'');
Logger::log('Loaded Plugin Header: \'' . $pluginName . '\'');
return true;
}
@ -257,7 +257,7 @@ class Plugins
if (method_exists($header, 'getPlugin'))
{
$this->plugins[$pluginName] = $header->getPlugin();
Factory::getInstance()->logger->log('Loaded Plugin: \'' . $pluginName . '\'');
Logger::log('Loaded Plugin: \'' . $pluginName . '\'');
return $this->plugins[$pluginName];
}
@ -281,7 +281,7 @@ class Plugins
throw new PluginException("Could not load plugin. Class does not exist", 1);
}
$this->plugins[$pluginName] = new $className($parameters);
Factory::getInstance()->logger->log('Loaded Plugin: \'' . $pluginName . '\'');
Logger::log('Loaded Plugin: \'' . $pluginName . '\'');
// And return it
return $this->plugins[$pluginName];