You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create an Apix Pushover Log instance, providing pre-configured Pushy Client and User instances to the constructor.
The new Log instance will be used for all subsequent messages sent through to Pushover.
By default, the logger will send a push notification for each log message received.
Especially given Pushover's monthly limitations and
"Being Friendly" clauses, I recommend calling
$logger->setDeferred(true) to aggregate log messages and send them in one message
when the destructor is called.
There is also a character length limitation for Pushover of 1024 characters. The
Pushover Logger will truncate at 1024 characters and will not indicate that the
message would have been longer. This means that you may possibly lose valuable
logging information if you aggregate too much at once.
##Example
// Create Pushy Client and User instances$pushy_client = newPushy\Client('APPLICATION KEY');
$pushy_user = newPushy\User('USER/GROUP ID');
$logger = newApix\Logger\Pushover($pushy_client, $pushy_user);
$logger->setDeferred(true);
$logger->info('Info about something');
$logger->error('An error occurred');