New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

healthengine/laravel-logging

logging stack for Laravel
81,023 3
Install
composer require healthengine/laravel-logging
Latest Version:v6.1.0
PHP:~8.3.0 || ~8.4.0 || ~8.5.0
Laravel:13
Older releases:5 – 12
License:MIT
Last Updated:Oct 7, 2026
Links: GitHub  ·  Packagist
Maintainer: jradtilbrook

Laravel Logging

Latest Stable Version Total Downloads Build Status

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_single, logstash_stderr, and logstash_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.

To customise configuration of these channels, copy the contents of laravel-logging.php to the channels key in the application's config/logging.php file.

The logstash_stderr channel includes a formatter for Logstash, the only difference compared to the logstash channel is that the log lines go to STDERR instead of to a file. This is useful for a Laravel application running in docker.

The logstash_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 a Laravel application running in docker.

Note: The logstash_stdout channel cannot be used with PHP FPM processes because PHP FPM makes STDOUT unavailable internally.

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.

Related Packages

avto-dev/events-log-laravel

Events logging for laravel applications

38,034 7
devtime-ltd/laravel-axiom-log

Batched Monolog handler for Axiom in Laravel.

6,075 0
anthonyedmonds/laravel-database-log

Store your Laravel logs in the database

5,977 1
naoray/laravel-github-monolog

Log driver to store logs as github issues

29,492 108
posapp-vn/laravel-lark-logging

A Laravel package for logging to Lark bot

1,636 3

Version History

Version Released PHP Laravel License
v6.1.0 ~8.3.0 || ~8.4.0 || ~8.5.0 ^13.0 MIT
v6.0.0 ~8.3.0 || ~8.4.0 ^13.0 MIT
v5.0.0 ~8.2.0 || ~8.3.0 ^11.0 || ^12.0 MIT
v4.1.0 ~8.1.0 || ~8.2.0 || ~8.3.0 ^10.0 || ^11.0 MIT
v4.0.4 ~8.1.0 || ~8.2.0 || ~8.3.0 ^10.0 || ^11.0 MIT