/** * Default constructor * * @param Thrift\Transport\TTransport $flumeTransport * @param ThriftFlumeEventServerClient $client * @param int $level The minimum logging level at which this handler will be triggered * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not * * @SuppressWarnings(PMD.UnusedLocalVariable) Exception needs to be caught, but can't be used */ public function __construct(Thrift\Transport\TTransport $flumeTransport, ThriftFlumeEventServerClient $client, $level = Logger::DEBUG, $bubble = true) { $this->client = $client; /* * Even if flume is away, the application should work. Thats why the exception is catched. */ try { $flumeTransport->open(); } catch (Thrift\Exception\TException $thriftException) { $this->handlingStopped = true; } parent::__construct($level, $bubble); }
/** * Default constructor * * @param string $routingKey * @param int $level The minimum logging level at which this handler will be triggered * @param bool $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct($routingKey, $level = Logger::DEBUG, $bubble = true) { $this->routingKey = $routingKey; parent::__construct($level, $bubble); }