private function _write_to_redis() { if (empty($this->_log_string)) { return false; } Game_AsyncLogger::getInstance()->push($this->_log_string); }
<?php /** * 处理异步推送的日志信息 * User: xiecg */ require dirname(__FILE__) . '/../global.php'; TenYear::getInstance(); ini_set('default_socket_timeout', -1); Com_AdCache::factory()->set_timeout(0); Game_AsyncLogger::getInstance()->register(); echo "register logger receive handler \r\n"; echo "start receive \r\n"; //开始接收 Com_Queued::receive_all();