upnid / logentries-bundle
Push Symfony logs to Logentries.
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 5 335
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 1
Requires
- logentries/logentries-monolog-handler: ^2.0
- symfony/symfony: >=2.4.0
Requires (Dev)
- phpunit/phpunit: ~4.8
This package is not auto-updated.
Last update: 2019-11-28 20:00:04 UTC
README
Push Symfony logs to Logentries.
Instructions
1 - Install the library
composer require upnid/logentries-bundle
2 - Add the bundle
<?php # app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new Upnid\Bundle\LogentriesBundle\LogentriesBundle(), ); // ... } // ... }
3 - Configure the bundle
# app/config/config.yml logentries: token: YOUR_PROJECT_TOKEN_HERE
4 - And add the handler
# app/config/config.yml monolog: handlers: logentries: type: service id: logentries.monolog.handler
Ready. It's enough.
Production Configurations
If you are using Logentries for production, what you probably are, you want to log only relevant things, like exceptions, errors, etc. For that, you can use some magic configurations.
Instead using the configurations shown in the forth step, use the following:
# app/config/config.yml monolog: handlers: fc_logentries: type: fingers_crossed action_level: error handler: logentries logentries: type: service id: logentries.monolog.handler level: debug
@TODO
- Make tests.
Licence
MIT. See here.