1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-07 05:36:45 +02:00

Change the default pushover title to the hostname

This commit is contained in:
Jordi Boggiano
2013-01-06 21:43:32 +01:00
parent 09d8747914
commit 176cb2a354

View File

@@ -32,13 +32,13 @@ class PushoverHandler extends SocketHandler
* @param integer $level The minimum logging level at which this handler will be triggered * @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 $bubble Whether the messages that are handled can bubble up the stack or not
*/ */
public function __construct($token, $user, $title = 'Monolog', $level = Logger::CRITICAL, $bubble = true) public function __construct($token, $user, $title = null, $level = Logger::CRITICAL, $bubble = true)
{ {
parent::__construct('api.pushover.net:80', $level, $bubble); parent::__construct('api.pushover.net:80', $level, $bubble);
$this->token = $token; $this->token = $token;
$this->user = $user; $this->user = $user;
$this->title = $title; $this->title = $title ?: gethostname();
} }
protected function generateDataStream($record) protected function generateDataStream($record)