manoaratefy/monolog-pushbullet

Yet another Monolog handler for Pushbullet

1.0.2 2024-02-07 14:02 UTC

This package is auto-updated.

Last update: 2025-06-07 16:52:56 UTC


README

Latest Version on Packagist Software License Total Downloads

manoaratefy/monolog-pushbullet is a laravel package providing a logging handler to send logs to Pushbullet.

Installation

You can install the package via composer:

composer require manoaratefy/monolog-pushbullet

Setup

Get access token from Pushbullet

You will need an access token from a Pushbullet account.

Add/edit your Laravel logging channel

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',
            ],
        ],        
    ],
];

Credits

License

The MIT License (MIT). Please see License File for more information.