<?php Bingo_Log::notice('abc'); abc::notice('abc'); Bingo_Log::warning('abc');
/** * 确保当前访问的是配置文件中的数据库 * 只适用于redis * @throws Exception */ private function ensureDB() { if ($this->connection['db'] != $this->db) { try { if (!$this->connection['handle']->select($this->db)) { throw new Exception('Select Failed'); } $this->connection['db'] = $this->db; Bingo_Log::notice("RedisSelect: {$this->name} {$this->db}", self::LOG_MODULE); } catch (Exception $e) { $message = $e->getMessage(); Bingo_Log::warning("RedisError: {$message} at {$this->name} select", self::LOG_MODULE); } } }