Ejemplo n.º 1
0
 public function __construct($slackUrl, IMessageFactory $messageFactory, $timeout)
 {
     parent::__construct(Debugger::$logDirectory, Debugger::$email, Debugger::getBlueScreen());
     $this->slackUrl = $slackUrl;
     $this->messageFactory = $messageFactory;
     $this->timeout = $timeout;
 }
Ejemplo n.º 2
0
 /**
  * @param string $directory
  * @param BlueScreen $blueScreen
  */
 public function __construct($directory, BlueScreen $blueScreen)
 {
     $logDirectoryRealPath = realpath($directory);
     if ($logDirectoryRealPath === FALSE || !is_dir($directory)) {
         throw new \Nella\MonologTracy\Tracy\InvalidLogDirectoryException(sprintf('Tracy log directory "%s" not found or is not a directory.', $directory));
     }
     parent::__construct($logDirectoryRealPath, NULL, $blueScreen);
 }
Ejemplo n.º 3
0
 public function __construct(Monolog\Logger $monolog)
 {
     $this->monolog = $monolog;
     // BC with Nette
     if (interface_exists('Tracy\\ILogger') && method_exists($this, 'logException')) {
         parent::__construct(Debugger::$logDirectory, Debugger::$email, Debugger::getBlueScreen());
     }
     $this->directory =& Debugger::$logDirectory;
     $this->email =& Debugger::$email;
 }
 public function __construct($slackUrl, $logUrl, $channel = NULL, $username = NULL, $icon = NULL, $pretext = NULL)
 {
     parent::__construct(Debugger::$logDirectory, Debugger::$email, Debugger::getBlueScreen());
     $this->slackUrl = $slackUrl;
     $this->logUrl = $logUrl;
     $this->channel = $channel;
     $this->username = $username;
     $this->icon = $icon;
     $this->pretext = $pretext;
 }
Ejemplo n.º 5
0
 /**
  * @param  string $apiToken
  * @param  string $room
  */
 public function __construct($apiToken, $room, $filters = [], $linkToLogFileFactory = NULL)
 {
     $reflection = new \ReflectionClass('Tracy\\Logger');
     if ($reflection->getConstructor()) {
         parent::__construct(Tracy\Debugger::$logDirectory, Tracy\Debugger::$email, Tracy\Debugger::getBlueScreen());
     } else {
         $this->directory = Tracy\Debugger::$logDirectory;
         $this->email = Tracy\Debugger::$email;
     }
     $this->linkToLogFileFactory = $linkToLogFileFactory;
     $this->logger = new Vysinsky\HipChat\Logger($apiToken, $room, $filters);
 }
Ejemplo n.º 6
0
 /**
  * SentryLogger constructor.
  * @param $dsn
  * @param bool $inDebug
  * @param null $directory
  * @param null $email
  * @param bool $autoWire
  * @param array $options
  */
 public function __construct($dsn, $inDebug = false, $directory = null, $email = null, $autoWire = true, $options = [])
 {
     // Compability with nette 2.2.0, Tracy\Logger has no __construct in 2.2.0
     if ((new \ReflectionClass('Tracy\\Logger'))->getConstructor()) {
         parent::__construct($directory, $email, Debugger::getBlueScreen());
     }
     //Check for production mode, you will want to fllod sentry only in production... right ?
     $this->enabled = Debugger::$productionMode || $inDebug;
     $this->raven = new \Raven_Client($dsn, $options);
     if ($autoWire) {
         //Add sentryNetteLogger to tracy
         $that = $this;
         Debugger::$onFatalError[] = function ($e) use($that) {
             $that->onFatalError($e);
         };
         // Add logger to tracy
         Debugger::setLogger($this);
     }
 }
Ejemplo n.º 7
0
 public function __construct($directory, array $options)
 {
     parent::__construct($directory);
     $this->options = $options;
 }
Ejemplo n.º 8
0
 public function __construct($directory, $email = NULL, Tracy\BlueScreen $blueScreen = NULL)
 {
     parent::__construct($directory, $email, $blueScreen);
     $this->mailer = [$this, 'defaultMailer'];
 }
Ejemplo n.º 9
0
 public function __construct($directory, $email = NULL, BlueScreen $blueScreen = NULL)
 {
     parent::__construct($directory, $email, $blueScreen);
     self::__init();
 }
Ejemplo n.º 10
0
 public function __construct($slackUrl, $logUrl)
 {
     parent::__construct(Debugger::$logDirectory, Debugger::$email, Debugger::getBlueScreen());
     $this->slackUrl = $slackUrl;
     $this->logUrl = $logUrl;
 }