renesis-tech/monday-logger

Monday Logger is a laravel package for monday.com integrations, used to post exceptions to monday board

v1.0.1 2020-04-06 08:38 UTC

This package is auto-updated.

Last update: 2025-06-25 17:13:02 UTC


README

Laravel monday logger is laravel plugin to send exception updates to Monday.com

Installation

This package is compatible with laravel 5.4+. Package can be installed using composer

composer require renesis-tech/monday-logger

Register Service Provider in your provider array of config/app.php

\Renesis\MondayLogger\ServiceProvider\MondayLoggerServiceProvider::class,

Add Facade to your config/app.php

'MondayLogger' => \Renesis\MondayLogger\Facade\MondayLogger::class,

Monday.com Configurations

Next you have to set monday.con configurations in .env file.

  1. Set monday.com V2 API key in .env file with key MONDAY_API_KEY

  2. Set Monday.com Board ID with key MONDAY_BOARD_ID

  3. Set Monday's Board group id with key MONDAY_GROUP_ID

  4. Set MONDAY_LOGGER_ENABLED to enable and disable monday.com logger, default is true.

!!!Without setting these configuration, package will not work.!!!

Here is how you can generate monday.com api v2 key Monday.com Developers.

Next you can publish configuration file by using this command

php artisan vendor:publish --provider="Renesis\MondayLogger\ServiceProvider\MondayLoggerServiceProvider"

It will create configurations file in config directory of project with an array.

return [
    'board_id' => env('MONDAY_BOARD_ID',null),
    'group_id' => env('MONDAY_GROUP_ID',null),
    'enabled' => true,
    'auth_info' => true
];

Usage

To log each exception to monday.com call MondayLogger facade report method in report function of app/Exceptions/Handler.php

public function report(Exception $exception)
    {
        //Enabled Monday Logger Reporting
        MondayLogger::report($exception);
        parent::report($exception);
    }

Important It will not log if you are using try catch method, You have to manually call MondayLogger report Method in catch case e.g.

try{
    //Some Logic Here
}catch (\Exception $e){
    MondayLogger::report($e)
}