Download the PHP package umang/laravel-logging-logstash without Composer
On this page you can find all versions of the php package umang/laravel-logging-logstash. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-logging-logstash
Laravel Logging
This is a custom package designed for Laravel. It provides a logging stack pre-configured to format for Logstash and adds multiple useful Monolog processors.
It includes the following processors to enrich logs with extra data:
- MemoryPeakUsageProcessor
which adds the peak memory usage using the
memory_get_peak_usage()
PHP function, - MemoryUsageProcessor
which adds the current memory usage using the
memory_get_usage()
PHP function, - UidProcessor which adds a unique ID to each instance of the logger class - useful to track all logs across a single request,
- WebProcessor which adds the current request URI, request method and client IP to a log record,
- BuildTagProcessor which is designed for use in docker and will add the image tag to the logs.
- IntrospectionProcessor which adds the file, class, function and line where the log was triggered.
Usage
A logstash
and stdout
logger have been made available for use as logging channels. You can use these in a stack
along with some others or use them standalone. Simply set your LOG_CHANNEL
environment variable to either of those
pre-configured channels.
The stdout
channel includes a formatter for Logstash, the only difference compared to the logstash
channel is that
the log lines go to STDOUT instead of to a file. This is useful for Laravel queue workers running in docker.
Note: The BuildTagProcessor requires you to inject the Docker build tag into build_tag
key in config/app.php
. If
it is not present, the value is not added to the logs.
License
Laravel Logging is licensed under the MIT license.
All versions of laravel-logging-logstash with dependencies
illuminate/queue Version ~5.7|^6.0|>=7.0
illuminate/support Version ~5.7|^6.0|>=7.0
monolog/monolog Version ^2.0