2017 © Pedro Peláez
 

symfony-bundle log-tracker

Display symfony logs in more elegant way and track exceptions by sending real time mails containing details about the exception.

image

slimen/log-tracker

Display symfony logs in more elegant way and track exceptions by sending real time mails containing details about the exception.

  • Thursday, May 17, 2018
  • by SlimenTN
  • Repository
  • 1 Watchers
  • 0 Stars
  • 76 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 3 % Grown

The README.md

LogTrackerBundle

Sometimes symfony does not display the exception in the browser, so you have to go to the log file and check the lastest log details so you can read the exception and locate the source of the problem.
Pretty annoying isn't ? Well LogtrackerBundle will make your life easier by displaying the details of the log file (dev.log and prod.log) in more elegant way with the possibility of filtering and searching inside the file.
LogTrackerBunlde helps you also to track any thrown exception in your project by sending real time email with the details of the exception., (*1)

Installation

  1. composer require slimen/log-tracker
  2. Enable the bundle in AppKernel.php new SBC\LogTrackerBundle\LogTrackerBundle(),
  3. Add this in config/routing.yml:
    yaml log_trucker: resource: "@LogTrackerBundle/Resources/config/routing.yml" prefix: /logger
  4. run php bin/console asset:install

Usage

  1. To display dev.log got to localhost:/YourProject/web/dev_app.php/logger/_dev
  2. To display prod.log got to localhost:/YourProject/web/dev_app.php/logger/_prod
  3. To keep track of thrown exception you need to add this in your config.yml file:
    yaml # LogTracker Configuration log_tracker: app_name: 'Your app name' sender_mail: 'your_mail@company.com' recipients: ['mail1@company.com', 'mail2@company.com'] #you can add as much as you want of addresses # optional (default value: 'twig') # type of response you want to return # 'twig' if you want to display a twig page # 'json' if you want to return a json response (in case of API) response: 'twig' # choose which exception code to exclude from the listener (optional) exclude_exceptions: [404, 403, ...]

How it works

In production mode LogTrackerBundle will catch any type of exception (except NotFoundException assuming that it will be handled to display 404 Not Found page) and will display this view (Of course unless you override it):

Default error catcher view, (*2)

Override the default view

You can override the whole view and display any view you want by following Symfony's override style
To override the view just add a view called error_catcher.html.twig under the folder app/Resources/LogTracker/views/ and create the view you want to display for your users., (*3)

License

This project is under the MIT license, (*4)

The Versions

17/05 2018

dev-master

9999999-dev

Display symfony logs in more elegant way and track exceptions by sending real time mails containing details about the exception.

  Sources   Download

MIT

The Requires

 

by Arnaout slimen

log file log track exceptions track

17/05 2018

v1.2.1

1.2.1.0

Display symfony logs in more elegant way and track exceptions by sending real time mails containing details about the exception.

  Sources   Download

MIT

The Requires

 

by Arnaout slimen

log file log track exceptions track

07/03 2018

v1.2.0

1.2.0.0

Display symfony logs in more elegant way and track exceptions by sending real time mails containing details about the exception.

  Sources   Download

MIT

The Requires

 

by Arnaout slimen

log file log track exceptions track

14/09 2017

1.0.1

1.0.1.0

Display symfony logs in more elegant way and track exceptions by sending real time mails containing details about the exception.

  Sources   Download

MIT

The Requires

 

by Arnaout slimen

log file log track exceptions track

14/09 2017

1.0.0

1.0.0.0

Display symfony logs in more elegant way and track exceptions by sending real time mails containing details about the exception.

  Sources   Download

MIT

The Requires

 

by Arnaout slimen

log file log track exceptions track