. * * ------------------------------------------------------------------------ * * This file is used to manage extra debug in files. * * ------------------------------------------------------------------------ * * @package FusionInventory * @author David Durieux * @copyright Copyright (c) 2010-2016 FusionInventory team * @license AGPL License 3.0 or (at your option) any later version * http://www.gnu.org/licenses/agpl-3.0-standalone.html * @link http://www.fusioninventory.org/ * @link https://github.com/fusioninventory/fusioninventory-for-glpi * */ if (!defined('GLPI_ROOT')) { die("Sorry. You can't access directly to this file"); } /** * Manage extra debug in files. */ class PluginFusioninventoryLogger { /** * Log when extra-debug is activated * * @param string $file * @param string $message */ static function logIfExtradebug($file, $message) { if (!PluginFusioninventoryConfig::isExtradebugActive()) { return; } Toolbox::logInFile($file, $message); } /** * log when extra-debug and debug mode is activated * * @param string $file * @param string $message */ static function logIfExtradebugAndDebugMode($file, $message) { if ($_SESSION['glpi_use_mode'] != Session::DEBUG_MODE) { return; } self::logIfExtradebug($file, $message); } }