craftcms / craftcms/cms

[4.x]: Craft should log errors when CRAFT_STREAM_LOG is true

Open
#17,719 1 comment 0 reactions 1 assignee View on GitHub

@timkelty is already working on this.

Since Aug 11, 2025.

bug craft4
Dominant language
PHP
Stars
3.6k
Forks
705
Avg merge
1d 5h
Merged PRs (30d)
134

Description

What happened?
Description

I have set the CRAFT_STREAM_LOG=true in the environment running Craft.

I can see 499 errors being reported from the app/health-check endpoint, but no error message is shown in the log stream.

Steps to reproduce
  1. Run Craft in an environment with CRAFT_STREAM_LOG=true set.
  2. Get Craft to produce an error.
  3. The status code gets logged, but nothing else.
Expected behavior

Should be able to understand why health checks are failing.

Actual behavior

Undocumented status code is reported with no clear explanation of errors.

Craft CMS version

4.14.15

PHP version

8.2

Operating system and version

docker craft/image:8.2

Database type and version

Mysql

Image driver and version

imagick

Installed plugins and versions

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.