[GH-ISSUE #219] i can not send a log with PushoverHandler in emergencyLevel #77

Closed
opened 2026-03-04 02:11:59 +03:00 by kerem · 3 comments
Owner

Originally created by @ghanbari on GitHub (Aug 8, 2013).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/219

i craete a instane of PushoverHandler
new PushoverHandler('app key, 'user key', $_SERVER['SERVER_NAME'], Logger::ALERT, TRUE, TRUE, Logger::ALERT, Logger::EMERGENCY);

and push this handler with $logger->pushHandler()

now i can sent a alert message with
$logger->addAlert($rawMessage);
but i can not send same message with
$logger->addEmergency($rawMessage);

so, i change https://github.com/Seldaek/monolog/blob/master/src/Monolog/Handler/PushoverHandler.php#L80
default value: $dataArray['priority'] = 2;
I set $dataArray['priority'] = 1;

have I a mistake think, or that is a bug?

Originally created by @ghanbari on GitHub (Aug 8, 2013). Original GitHub issue: https://github.com/Seldaek/monolog/issues/219 i craete a instane of PushoverHandler new PushoverHandler('app key, 'user key', $_SERVER['SERVER_NAME'], Logger::ALERT, TRUE, TRUE, Logger::ALERT, Logger::EMERGENCY); and push this handler with $logger->pushHandler() now i can sent a alert message with $logger->addAlert($rawMessage); but i can not send same message with $logger->addEmergency($rawMessage); so, i change https://github.com/Seldaek/monolog/blob/master/src/Monolog/Handler/PushoverHandler.php#L80 default value: $dataArray['priority'] = 2; I set $dataArray['priority'] = 1; have I a mistake think, or that is a bug?
kerem closed this issue 2026-03-04 02:11:59 +03:00
Author
Owner

@ghanbari commented on GitHub (Aug 8, 2013):

https://www.pushover.net/api#priority
pushover say that we must set 'priority' & ' expire',
i set those, and i was work very good.

if ($record['level'] >= $this->emergencyLevel) {
$dataArray['priority'] = 2;
}

convert to:

if ($record['level'] >= $this->emergencyLevel) {
$dataArray['priority'] = 2;
$dataArray['retry'] = 100;
$dataArray['expire'] = 100;
}

<!-- gh-comment-id:22331353 --> @ghanbari commented on GitHub (Aug 8, 2013): https://www.pushover.net/api#priority pushover say that we must set 'priority' & ' expire', i set those, and i was work very good. if ($record['level'] >= $this->emergencyLevel) { $dataArray['priority'] = 2; } convert to: if ($record['level'] >= $this->emergencyLevel) { $dataArray['priority'] = 2; $dataArray['retry'] = 100; $dataArray['expire'] = 100; }
Author
Owner

@Seldaek commented on GitHub (Aug 8, 2013):

Merged your fix, thanks! For next time running the tests would be nice though :)

<!-- gh-comment-id:22366200 --> @Seldaek commented on GitHub (Aug 8, 2013): Merged your fix, thanks! For next time running the tests would be nice though :)
Author
Owner

@ghanbari commented on GitHub (Aug 11, 2013):

no problem, i no learn write a test class(php unit), else i fix it
i have learning it, now.
and very very thanks for your project
sorry if i can not speak english good.

<!-- gh-comment-id:22466680 --> @ghanbari commented on GitHub (Aug 11, 2013): no problem, i no learn write a test class(php unit), else i fix it i have learning it, now. and very very thanks for your project sorry if i can not speak english good.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#77
No description provided.