示例#1
0
 /**
  * @param Config $config
  */
 public function __construct(Config $config, GitWrapper $gitWrapper, GitLoggerListener $gitLoggerListener)
 {
     $this->config = $config;
     $this->wrapper = $gitWrapper;
     $this->wrapper->setTimeout(self::TIMEOUT);
     $this->wrapper->streamOutput(0);
     $this->wrapper->addLoggerListener($gitLoggerListener);
     $this->git = $this->wrapper->workingCopy($this->config->getBasePath());
 }
示例#2
0
 /**
  * @param $resFactory
  * @return RedisHandler
  */
 private function getRedisLogstashHandler(Client $redis, $type, $level)
 {
     $redisHandlerTracker = new RedisPublishHandler($redis, $type, $level);
     $redisHandlerTracker->setFormatter(new LogstashFormatter($this->config->get(self::CONFIG_APPNAME), null, null, 'ctxt_', LogstashFormatter::V1));
     return $redisHandlerTracker;
 }