diff --git a/src/FuzeWorks/Core.php b/src/FuzeWorks/Core.php index 99863fb..5039164 100644 --- a/src/FuzeWorks/Core.php +++ b/src/FuzeWorks/Core.php @@ -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'); diff --git a/src/FuzeWorks/Logger.php b/src/FuzeWorks/Logger.php index 9a5f65f..26322f7 100644 --- a/src/FuzeWorks/Logger.php +++ b/src/FuzeWorks/Logger.php @@ -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'], diff --git a/src/FuzeWorks/Plugins.php b/src/FuzeWorks/Plugins.php index e55b9c0..137e204 100644 --- a/src/FuzeWorks/Plugins.php +++ b/src/FuzeWorks/Plugins.php @@ -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];