graycore/magento2-stdlogging

A Magento 2 module that changes all logging handlers to stdout

Maintainers

Package info

github.com/graycoreio/magento2-stdlogging

Type:magento2-module

pkg:composer/graycore/magento2-stdlogging

Transparency log

Fund package maintenance!

graycoreio

Statistics

Installs: 91 329

Dependents: 0

Suggesters: 0

Stars: 24

Open Issues: 2

v2.1.2 2026-05-18 15:22 UTC

This package is auto-updated.

Last update: 2026-08-26 16:59:52 UTC


README

Packagist Downloads Packagist Version Packagist License MageCheck Status MageCheck Supported Version

Magento Version Support

Magento v2.3 Supported Magento v2.4 Supported

Purpose

This module is a drop in replacement to pump all Magento 2 logs to StdOut. This is especially useful when working in a dockerized environment where you want to aggregate your logs into an external system without having to know about Magento specific log files and configurations.

Detached background processes

Magento detaches cron group workers and message queue consumers by appending 2>/dev/null >/dev/null & to the command, discarding everything they write — including uncatchable PHP fatals (e.g. memory_limit exhaustion) that never reach Monolog. This module rewrites that redirect to point at PID 1's stdout, the stream the container runtime collects, while keeping the process detached. Where PID 1's descriptors are unreachable (no /proc, unprivileged caller), core behaviour is left untouched.

Getting Started

This module is intended to be installed with composer. From the root of your Magento 2 project:

  1. Download the package
composer require graycore/magento2-stdlogging
  1. Enable the package
./bin/magento module:enable Graycore_StdLogging

Upgrading