Download the PHP package ubatgroup/graylog without Composer
On this page you can find all versions of the php package ubatgroup/graylog. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package graylog
Laravel wrapper for UbatGroup Graylog Server
It is a laravel wrapper for bzikarsky/gelf-php package.
This package was developed for an internal need. No maintenance's planned.
Installation
Install via composer
Only for Laravel 5 to 5.3
Add it to your providers array in config/app.php
:
To use the facade, add it to your aliases array in config/app.php
:
For Laravel 5.4 and more
Laravel auto discover new packages
Configuration
Set the graylog configuration into the .env file :
- GRAYLOG_SERVER : server graylog ip (if this key is not set, it uses 127.0.0.1)
- GRAYLOG_PORT : server graylog port (if this key is not set, it uses 12201)
- GRAYLOG_FACILITY : graylog facility filter (if this key is not set, it uses APP_URL key)
- GRAYLOG_APPNAME : graylog source filter (if this key is not set, it uses APP_NAME key)
To override the configuration file :
First, publish the configuration file:
See the content of the published configuration file in config/graylog.php
.
Usage
See the bzikarsky/gelf-php examples in his repo to find the available methods for the Graylog
facade.
Example
Note
- If auto_log_auth_user config key and Auth::check() are true, Auth::user() data are auto added to the context array (auth_user key)
- If you need to use $guard to get the authenticated user, turn false the auto_log_auth_user config key and add it manually in additionnal data array
- Don't use special/accentuated chars in context key for additionals data
License
This package is released under the MIT Licence.
All versions of graylog with dependencies
illuminate/support Version ~5.2.0|~5.3.0|~5.4.0|~5.5.0|~5.6.0
graylog2/gelf-php Version ~1.5