/**
  * @param string   $apiToken
  * @param bool|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
  *
  * @throws MissingExtensionException if OpenSSL is missing
  */
 public function __construct($apiToken, $level = Logger::DEBUG, $bubble = true)
 {
     if (!extension_loaded('openssl')) {
         throw new MissingExtensionException('The OpenSSL PHP extension is required to use the FlowdockHandler');
     }
     parent::__construct('ssl://api.flowdock.com:443', $level, $bubble);
     $this->apiToken = $apiToken;
 }
 /**
  * @param string  $token  Log token supplied by LogEntries
  * @param boolean $useSSL Whether or not SSL encryption should be used.
  * @param int     $level  The minimum logging level to trigger this handler
  * @param boolean $bubble Whether or not messages that are handled should bubble up the stack.
  *
  * @throws MissingExtensionExcpetion If SSL encryption is set to true and OpenSSL is missing
  */
 public function __construct($token, $useSSL = true, $level = Logger::DEBUG, $bubble = true)
 {
     if ($useSSL && !extension_loaded('openssl')) {
         throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for LogEntriesHandler');
     }
     $endpoint = $useSSL ? 'ssl://api.logentries.com:20000' : 'data.logentries.com:80';
     parent::__construct($endpoint, $level, $bubble);
     $this->logToken = $token;
 }
 /**
  * Construct a new Fleep.io Handler.
  *
  * For instructions on how to create a new web hook in your conversations
  * see https://fleep.io/integrations/webhooks/
  *
  * @param  string                    $token  Webhook token
  * @param  bool|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
  * @throws MissingExtensionException
  */
 public function __construct($token, $level = Logger::DEBUG, $bubble = true)
 {
     if (!extension_loaded('openssl')) {
         throw new MissingExtensionException('The OpenSSL PHP extension is required to use the FleepHookHandler');
     }
     $this->token = $token;
     $connectionString = 'ssl://' . self::FLEEP_HOST . ':443';
     parent::__construct($connectionString, $level, $bubble);
 }
 /**
  * @param string       $token             Pushover api token
  * @param string|array $users             Pushover user id or array of ids the message will be sent to
  * @param string       $title             Title sent to the Pushover API
  * @param integer      $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
  * @param Boolean      $useSSL            Whether to connect via SSL. Required when pushing messages to users that are not
  *                                        the pushover.net app owner. OpenSSL is required for this option.
  * @param integer      $highPriorityLevel The minimum logging level at which this handler will start
  *                                        sending "high priority" requests to the Pushover API
  * @param integer      $emergencyLevel    The minimum logging level at which this handler will start
  *                                        sending "emergency" requests to the Pushover API
  * @param integer      $retry             The retry parameter specifies how often (in seconds) the Pushover servers will send the same notification to the user.
  * @param integer      $expire            The expire parameter specifies how many seconds your notification will continue to be retried for (every retry seconds).
  */
 public function __construct($token, $users, $title = null, $level = Logger::CRITICAL, $bubble = true, $useSSL = true, $highPriorityLevel = Logger::CRITICAL, $emergencyLevel = Logger::EMERGENCY, $retry = 30, $expire = 25200)
 {
     $connectionString = $useSSL ? 'ssl://api.pushover.net:443' : 'api.pushover.net:80';
     parent::__construct($connectionString, $level, $bubble);
     $this->token = $token;
     $this->users = (array) $users;
     $this->title = $title ?: gethostname();
     $this->highPriorityLevel = Logger::toMonologLevel($highPriorityLevel);
     $this->emergencyLevel = Logger::toMonologLevel($emergencyLevel);
     $this->retry = $retry;
     $this->expire = $expire;
 }
 /**
  * @param string      $token         Slack API token
  * @param string      $channel       Slack channel (encoded ID or name)
  * @param string      $username      Name of a bot
  * @param bool        $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise)
  * @param string|null $iconEmoji     The emoji name to use (or null)
  * @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($token, $channel, $username = '******', $useAttachment = true, $iconEmoji = null, $level = Logger::CRITICAL, $bubble = true)
 {
     if (!extension_loaded('openssl')) {
         throw new MissingExtensionException('The OpenSSL PHP extension is required to use the SlackHandler');
     }
     parent::__construct('ssl://slack.com:443', $level, $bubble);
     $this->token = $token;
     $this->channel = $channel;
     $this->username = $username;
     $this->iconEmoji = trim($iconEmoji, ':');
     $this->useAttachment = $useAttachment;
 }
 /**
  * @param string  $token  HipChat API Token
  * @param string  $room   The room that should be alerted of the message (Id or Name)
  * @param string  $name   Name used in the "from" field
  * @param bool    $notify Trigger a notification in clients or not
  * @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
  * @param Boolean $useSSL Whether to connect via SSL.
  * @param string  $format The format of the messages (default to text, can be set to html if you have html in the messages)
  */
 public function __construct($token, $room, $name = 'Monolog', $notify = false, $level = Logger::CRITICAL, $bubble = true, $useSSL = true, $format = 'text')
 {
     if (!$this->validateStringLength($name, static::MAXIMUM_NAME_LENGTH)) {
         throw new \InvalidArgumentException('The supplied name is too long. HipChat\'s v1 API supports names up to 15 UTF-8 characters.');
     }
     $connectionString = $useSSL ? 'ssl://api.hipchat.com:443' : 'api.hipchat.com:80';
     parent::__construct($connectionString, $level, $bubble);
     $this->token = $token;
     $this->name = $name;
     $this->notify = $notify;
     $this->room = $room;
     $this->format = $format;
 }