/** * Sets a new level to log messages of. * * @param string $level Must be one of the Zend_Log LOG_* constants. * * @see Zend_Log * * @return void */ public function setLogLevel($level) { if (!is_numeric($level)) { if (!defined('DocBlox_Core_Log::' . strtoupper($level))) { throw new InvalidArgumentException('Expected one of the constants of the DocBlox_Core_Log class, "' . $level . '" received'); } $constant = 'DocBlox_Core_Log::' . strtoupper($level); $level = constant($constant); } if (self::$logger) { self::$logger->setThreshold($level); } if (self::$stdout_logger) { self::$stdout_logger->setThreshold($level); } self::$log_level = $level; }