protected function processLogs ($logs) {
        $redis = $this->getConnection ()->getClient ();
        foreach ($logs as $log) {
            $item = array(
                "level" => $log[1] ,
                "category" => $log[2] ,
                "time" => $log[3] ,
                "message" => $log[0] ,
            );
            $json = Json::encode($item);
            if ($this->useChannel) {
                $redis->publish ($this->redisKey , $json);
            } else {
                $redis->zAdd ($this->redisKey , $log[3] , $json);
            }
        }
    }
protected function processLogs ($logs) {
        $redis = $this->getConnection ()->getClient ();
        foreach ($logs as $log) {
            $item = array(
                "level" => $log[1] ,
                "category" => $log[2] ,
                "time" => $log[3] ,
                "message" => $log[0] ,
            );
            $json = Json::encode($item);
            if ($this->useChannel) {
                $redis->publish ($this->redisKey , $json);
            } else {
                $redis->zAdd ($this->redisKey , $log[3] , $json);
            }
        }
    }
protected function processLogs ( $ logs ) { $ redis = $ this -> getConnection ( ) -> getClient ( ) ; foreach ( $ logs as $ log ) { $ item = array ( "level" => $ log [ 1 ] , "category" => $ log [ 2 ] , "time" => $ log [ 3 ] , "message" => $ log [ 0 ] , ) ; $ json = Json :: encode ( $ item ) ; if ( $ this -> useChannel ) { $ redis -> publish ( $ this -> redisKey , $ json ) ; } else { $ redis -> zAdd ( $ this -> redisKey , $ log [ 3 ] , $ json ) ; } } }
Stores or broadcasts log messages via redis.
@param array $logs list of log messages
Stores or broadcasts log messages via redis .