/** * __construct * * Creates a new log adapter instance * * @access public * @param array $channels * @param array $configuration * @return LogAdapterInterface **/ public function __construct(array $channels = array(), array $configuration = array()) { parent::__construct($channels, $configuration); if (!($this->client = $this->getConfigurationValue("raven_client")) instanceof Raven_Client) { $this->client = new Raven_Client($this->getConfigurationValue("dsn")); $this->setConfigurationValue("raven_client", $this->client); } }
/** * __construct * * Creates a new log adapter instance * * @access public * @param array $channels * @param array $configuration * @return LogAdapterInterface **/ public function __construct(array $channels = array(), array $configuration = array()) { parent::__construct($channels, $configuration); $resource = @fopen($this->getConfigurationValue("resource"), "a"); if (!is_resource($resource)) { throw new RuntimeException("Cannot open resource '" . $this->getConfigurationValue("resource") . "' for " . __CLASS__ . "."); } $this->resource = $resource; }