manoaratefy/monolog-pushbullet
is a laravel package providing a logging handler to send logs to Pushbullet.
You can install the package via composer:
composer require manoaratefy/monolog-pushbullet
You will need an access token from a Pushbullet account.
You must add a new channel or edit an existing channel. This will be done into your config/logging.php
file:
// config/logging.php
'channels' => [
//...
'pushbullet' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => \Manoaratefy\MonologPushbullet\LogHandler::class,
'with' => [
'title' => env('PUSHBULLET_NOTIFICATION_TITLE'),
'accessToken' => env('PUSHBULLET_ACCESSTOKEN'),
'emails' => env('PUSHBULLET_TARGET'),
],
],
];
You can then provide the settings in your .env
file:
PUSHBULLET_NOTIFICATION_TITLE="Notification from MyApp"
PUSHBULLET_ACCESSTOKEN="xxxxxxxxxxxx"
PUSHBULLET_TARGET="my-pushbullet@email-account.com"
You can provide multiple email accounts by separating them with a comma (,
) or by providing an array:
// config/logging.php
'channels' => [
//...
'pushbullet' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => \Manoaratefy\MonologPushbullet\LogHandler::class,
'with' => [
'title' => env('PUSHBULLET_NOTIFICATION_TITLE'),
'accessToken' => env('PUSHBULLET_ACCESSTOKEN'),
'emails' => [
'email1@example.com',
'email2@example.com',
],
],
],
];
- Got some ideas from marvinlabs/laravel-discord-logger
The MIT License (MIT). Please see License File for more information.