axharus/art-handler

This package works with special art-sites.org api to notify our developers that something wrong happend

Installs: 170

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 7

Language:JavaScript

1.2.3 2021-04-23 09:14 UTC

README

This package only for art-sites.org clients.

What this package for

  • Logging errors inside laravel
  • Logging errors in JS and XHR Requests

Plugin works only when debug=false in .env file

Installation

ArtHandler requires Laravel v5.6+ and php 7.2+ to run.

Install package

$ composer require axharus/art-handler

Migrate database

$ php artisan migrate

Add provider to app.js if laravel version is lower than 5.5

\Axharus\ArtHandler\ArtHandlerServiceProvider::class

Publish resources

$ php artisan vendor:publish --provider="Axharus\ArtHandler\ArtHandlerServiceProvider" --force 

For production it is better to use bable because debuger.js is written on ES6

Install debbuger.js into your template. Please install it in head section on top of outer in order to catch all error in your application.

{!! \Axharus\ArtHandler\ArtHandler::scriptLoader('/vendor/debuger/build/debuger-min.js') !!}

Pass path to babeled file into this function or use default if it is only for dev purposes

Configure .env file

ARTDEBUGER_API=api_key
ARTDEBUGER_FORCEDEBUG=false
ARTDEBUGER_JS_DEBUG=false
ARTDEBUGER_PREVENTOR=
ARTDEBUGER_HANDLER_URL=
ARTDEBUGER_ENABLED=true
ARTDEBUGER_CHUNKSIZE=5

API key you can get from your project manager

If you want to work with plugin with debug=true set FORCEDEBUG=true.

If you want to see sending log in console set ARTDEBUGER_JS_DEBUG=true

If you want to prevent sending errors with some codes pass it to ARTDEBUGER_ARTPREVENTOR using comma 404,500,403

If you want to force disable art handler set ARTDEBUGER_ENABLED=false

To optimize a lot of request set ARTDEBUGER_CHUNKSIZE