Download the PHP package lucderheld/php-greylog-exception without Composer
On this page you can find all versions of the php package lucderheld/php-greylog-exception. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lucderheld/php-greylog-exception
More information about lucderheld/php-greylog-exception
Files in lucderheld/php-greylog-exception
Package php-greylog-exception
Short Description A php exception logging implementation to send log-messages to a graylog compatible backend.
License GPL-3.0
Informations about the package php-greylog-exception
php-greylog-exception
Is a very usefull state of the art exception class and handler for PHP 7

Usage / Installation
Recommended installation via composer:
Add php-greylog-exception to composer.json
either by running composer require lucderheld/php-greylog-exception
or by defining it manually:
"require": {
// ...
"lucderheld/php-greylog-exception": "1.0"
// ...
}
Reinstall dependencies: composer install
Install GrayLog2-Server:
How GrayLog2 can be installed is well documented at http://docs.graylog.org/en/2.1/pages/installation.html The easiest way to test GreyLog is to run it as a Virtual-Machine:
-
Usage Example
GreyLog output:
-
Combination with own functions
php-greylog-exception can be combined with user defined exception-functions. The functions are triggered before the exception is logged to GreyLog. To define a exception-function, just create a static-function and name it the same as the actual exception.
Example:
PHP-Output:
The function NOT_BOOTED was called!Exception 10000002 was sent to GreyLog-Server 127.0.0.1
-
Parameter logging
When an exception occours it is important to have as many informations as possible. The php-greylog-exception-class collects all the parameters that where called and saves them as serialized strings.
Example:
GreyLog output:
License
The library is licensed under the GPL3 license. For details check out the LICENSE file.
Development & Contributing
You are welcome to modify, extend and bugfix as much as you like! :-) If you have any questions/proposals/etc. you are welcome to contact me via email.