/** * @param \Doctrine\DBAL\Connection $conn * @param string $table * @param array $columnMap * @param int $level * @param bool $bubble */ public function __construct(\Doctrine\DBAL\Connection $conn, $table, array $columnMap, $level = Logger::DEBUG, $bubble = true) { $this->conn = $conn; $this->table = $table; $this->columnMap = $columnMap; parent::__construct($level, $bubble); }
/** * {@inheritdoc} */ public function handle(array $record) { if ($record['channel'] != 'twitter_data') { return false; } return parent::handle($record); }
public function __construct(MessageSender $sender, SmsapiFormatterFactory $formatterFactory, SmsapiConfig $config) { parent::__construct($config->handlerLoggerLevel, $config->handlerBubble); $this->sender = $sender; $this->formatterFactory = $formatterFactory; $this->config = $config; }
/** * $topic_arn is name of a topic that you have created either in the control panel or * using AmazonSNS->create_topic * * For the $snsClient pass a a ready SnsClient, depending ony your setup * More info http://docs.aws.amazon.com/aws-sdk-php/guide/latest/service-sns.html * * @param string $topicArn The name of the SNS topic to publish to * @param string $subject Used for email subscriptions to the topic * @param SnsClient $snsClient The Sns client * @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 */ public function __construct($topicArn, $subject, SnsClient $snsClient, $level = Logger::DEBUG, $bubble = true) { parent::__construct($level, $bubble); $this->topicArn = $topicArn; $this->subject = $subject; $this->sns = $snsClient; }
/** * {@inheritdoc} * * Depending on the input type of the Loggly interface, this will default * to either a JSON formatter or a text appropriate formatter. * * @return \Monolog\Formatter\FormatterInterface */ protected function getDefaultFormatter() { if ($this->getLoggly()->getInput()->getFormat() === 'json') { return new JsonFormatter(); } return parent::getDefaultFormatter(); }
/** * @param string $slackTeam Slack team slug * @param string $token Slackbot token * @param string $channel Slack channel (encoded ID or name) * @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($slackTeam, $token, $channel, $level = Logger::CRITICAL, $bubble = true) { parent::__construct($level, $bubble); $this->slackTeam = $slackTeam; $this->token = $token; $this->channel = $channel; }
/** * @param int $logName * @param bool|int $level * @param bool|true $bubble */ public function __construct($logName, $level = Logger::DEBUG, $bubble = true) { $this->logName = $logName; $log = get_option($this->logName); $this->logs = is_array($log) ? $log : array(); parent::__construct($level, $bubble); }
public function __construct(Build $build, $level = LogLevel::INFO, $bubble = true) { parent::__construct($level, $bubble); $this->build = $build; // We want to add to any existing saved log information. $this->logValue = $build->getLog(); }
public function __destruct() { if ($this->sendOnDestruct) { $this->send(); } parent::__destruct(); }
/** * {@inheritdoc} * * @param null $function The raising function, if not set the channel name is used. * @param null $action The log action, if not set the level is used. */ public function __construct($level = Logger::DEBUG, $bubble = true, $function = null, $action = null) { parent::__construct($level, $bubble); $this->function = $function; $this->action = $action; $this->adapter = new ContaoHandlerAdapter(); }
public function __construct(OutputInterface $output = null, $bubble = true, array $verbosityLevelMap = array()) { parent::__construct(Logger::DEBUG, $bubble); if ($verbosityLevelMap) { $this->verbosityLevelMap = $verbosityLevelMap; } }
public function __construct($hooksurl, $channel, $username, $level = Logger::ERROR, $bubble = true) { parent::__construct($level, $bubble); $this->hooksurl = $hooksurl; $this->channel = $channel; $this->username = $username; }
/** * @param string $account_sid Twilio api account sid * @param string $auth_token Twilio api access token * @param string|array $from_numbers Phone number or array of numbers (one is selected randomly) * the message will be sent from. * @param string|array $to_numbers Phone number or array of numbers the message will be sent to * @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 */ public function __construct($account_sid, $auth_token, $from_numbers, $to_numbers, $level = Logger::CRITICAL, $bubble = true) { $this->twilio_client = new \Services_Twilio($account_sid, $auth_token); $this->to_numbers = (array) $to_numbers; $this->from_numbers = (array) $from_numbers; parent::__construct($level, $bubble); }
public function __construct(GatewayInterface $gateway, $number, $sender = null, $level = Logger::CRITICAL, $bubble = true) { parent::__construct($level, $bubble); $this->gateway = $gateway; $this->number = $number; $this->sender = $sender; }
/** * SlackWebhookHandler constructor. * * @param SlackConfig $slackConfig * @param MonologConfig $monologConfig * * @throws MissingExtensionException When the curl extension is not activated */ public function __construct(SlackConfig $slackConfig, MonologConfig $monologConfig, Curl\Util $curlUtil) { parent::__construct($monologConfig->getLevel(), $monologConfig->doesBubble()); $this->slackConfig = $slackConfig; $this->monologConfig = $monologConfig; $this->curlUtil = $curlUtil; }
/** * @param StatsdClientInterface $statsDService The Service sends the packet * @param StatsdDataFactoryInterface $statsDFactory The Factory creates the StatsDPacket * @param string $prefix Statsd key prefix * @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 */ public function __construct(StatsdClientInterface $statsDService, StatsdDataFactoryInterface $statsDFactory = null, $prefix, $level = Logger::DEBUG, $bubble = true) { parent::__construct($level, $bubble); $this->statsDService = $statsDService; $this->statsDFactory = $statsDFactory ? $statsDFactory : new StatsdDataFactory(); $this->prefix = $prefix; }
/** * @param string $name * @param int $level * @param bool $bubble */ public function __construct($name, $level = Logger::DEBUG, $bubble = true) { parent::__construct($level, $bubble); $this->name = $name; $this->notifier = JoliNotif\NotifierFactory::create(); $this->notification = new JoliNotif\Notification(); }
/** * BugSnagHandler constructor. * * @param int $level * @param bool $bubble * @param string $error_name * @param Bugsnag_Client $bugsnag */ public function __construct($level = Logger::WARNING, $bubble = true, $error_name, Bugsnag_Client $bugsnag) { parent::__construct($level, $bubble); $this->bugsnag = $bugsnag; $this->error_name = $error_name; $this->bugsnag->setBeforeNotifyFunction([$this, 'beforeNotifyFunction']); }
public function __construct(EntityManager $em, TokenStorageInterface $tokenStorage, Request $request, $level = Logger::DEBUG, $bubble = true) { $this->em = $em; $this->tokenStorage = $tokenStorage; $this->request = $request; parent::__construct($level, $bubble); }
/** * {@inheritdoc} */ public function setFormatter(FormatterInterface $formatter) { if ($formatter instanceof ElasticaFormatter) { return parent::setFormatter($formatter); } throw new \InvalidArgumentException('ElasticSearchHandler is only compatible with ElasticaFormatter'); }
public function __construct($url = null, $apiParametersArray = array(), $logMessageKeyName = "message", $level = Logger::DEBUG, $bubble = true) { $this->apiURL = $url; $this->apiParametersArray = $apiParametersArray; $this->logMessageKeyName = $logMessageKeyName; parent::__construct($level, $bubble); }
/** * * @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 */ public function __construct($level = Logger::DEBUG, $bubble = true) { parent::__construct($level, $bubble); if (!function_exists('json_encode')) { throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s ChromePHPHandler'); } }
/** * {@inheritDoc} * * @param string $appName * @param boolean $explodeArrays * @param string $transactionName */ public function __construct($level = Logger::ERROR, $bubble = true, $appName = null, $explodeArrays = false, $transactionName = null) { parent::__construct($level, $bubble); $this->appName = $appName; $this->explodeArrays = $explodeArrays; $this->transactionName = $transactionName; }
/** * Construct * * @param int $level * @param bool $bubble * @throws MissingExtensionException */ public function __construct($level = Logger::DEBUG, $bubble = true) { if (!function_exists('zend_monitor_custom_event')) { throw new MissingExtensionException('You must have Zend Server installed in order to use this handler'); } parent::__construct($level, $bubble); }
/** * @param string $ident * @param mixed $facility * @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 */ public function __construct($ident, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true) { parent::__construct($level, $bubble); if (false === strpos(PHP_OS, 'WIN')) { $this->facilities['local0'] = LOG_LOCAL0; $this->facilities['local1'] = LOG_LOCAL1; $this->facilities['local2'] = LOG_LOCAL2; $this->facilities['local3'] = LOG_LOCAL3; $this->facilities['local4'] = LOG_LOCAL4; $this->facilities['local5'] = LOG_LOCAL5; $this->facilities['local6'] = LOG_LOCAL6; $this->facilities['local7'] = LOG_LOCAL7; } // convert textual description of facility to syslog constant if (array_key_exists(strtolower($facility), $this->facilities)) { $facility = $this->facilities[strtolower($facility)]; } else { if (!in_array($facility, array_values($this->facilities), true)) { throw new \UnexpectedValueException('Unknown facility value "' . $facility . '" given'); } } if (!openlog($ident, LOG_PID, $facility)) { throw new \LogicException('Can\'t open syslog for ident "' . $ident . '" and facility "' . $facility . '"'); } }
/** * @param PublisherInterface|IMessagePublisher|Publisher $publisher a publisher object * @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 */ public function __construct($publisher, $level = Logger::DEBUG, $bubble = true) { parent::__construct($level, $bubble); if (!$publisher instanceof Publisher && !$publisher instanceof IMessagePublisher && !$publisher instanceof PublisherInterface) { throw new InvalidArgumentException('Invalid publisher, expected a Gelf\\Publisher, Gelf\\IMessagePublisher or Gelf\\PublisherInterface instance'); } $this->publisher = $publisher; }
/** * CloudWatchHandler constructor. * * @param CloudWatchLogsClient $client * @param string $logGroupName * @param string $logStreamName * @param int $retentionDays * @param int $level * @param bool $bubble */ public function __construct(CloudWatchLogsClient $client, $logGroupName, $logStreamName, $retentionDays = 7, $level = Logger::DEBUG, $bubble = true) { $this->client = $client; $this->logGroupName = $logGroupName; $this->logStreamName = $logStreamName; $this->retentionDays = $retentionDays; parent::__construct($level, $bubble); }
public function __construct($mongo, $database, $collection, $level = Logger::DEBUG, $bubble = true) { if (!($mongo instanceof \MongoClient || $mongo instanceof \Mongo)) { throw new \InvalidArgumentException('MongoClient or Mongo instance required'); } $this->mongoCollection = $mongo->selectCollection($database, $collection); parent::__construct($level, $bubble); }
public function __construct($token, $level = Logger::DEBUG, $bubble = true) { if (!extension_loaded('curl')) { throw new \LogicException('The curl extension is needed to use the LogglyHandler'); } $this->token = $token; parent::__construct($level, $bubble); }
/** * @param Logger $logger * @param int $level * @param boolean $bubble * @param string $name */ public function __construct(Logger $logger = null, $level = Logger::DEBUG, $bubble = true, $name = 'monolog') { parent::__construct($level, $bubble); $this->name = $name; if ($logger !== null) { $this->addLogger($logger); } }