corpsoft/logging

There is no license information available for the latest version (v1.0.0) of this package.

Global Slack logging in system

v1.0.0 2023-06-29 08:58 UTC

This package is auto-updated.

Last update: 2024-10-29 12:35:09 UTC


README

Logging Problems


This package has:

  • Logging All Exceptions
  • Logging when Failed Job
  • Logging When Querying long

Setting

Check Provider

Check if config/app.php in "providers" exists below provider:

Corpsoft\Logging\LoggingServiceProvider::class,

Publish config file

Publish config file

php artisan vendor:publish --tag=logging

Setting Slack webhook

Open link https://slack.com/apps/A0F7XDUAZ-incoming-webhooks, get webhook url, and put in .env

Add in .env file

LOG_CS_SLACK_WEBHOOK_URL=

Config File and .env variables (FOR INFORMATION)

Possible .env variables

 LOG_CS_ENABLE_JOB_FAILED_TRACKING=
 LOG_CS_ENABLE_QUERYING_LONG_TRACKING=
 LOG_CS_ENABLE_GLOBAL_EXCEPTION_TRACKING=
 LOG_CS_MAX_QUERYING_TIME_TRACKING=

Here is a description of the config\logging-problems.php

'enable_in_environment'  // Which environment enabled. Default enabled 'production'

'enable_job_failed_tracking' // Includes Tracking of Failing Job. Default true
'enable_querying_for_longer_time_tracking' // Includes Tracking of long query. Default true
'enable_global_exception_tracking' // Includes global tracking of 500 errors Default true

'max_querying_time_tracking' // The maximum query threshold at which this will be logged (in milliseconds), the default is 1000