Skip to content

Contextual data array not displayed in backend Event Log despite documentation #1475

@andrewxx

Description

@andrewxx

Winter CMS Build

1.2

PHP Version

8.1

Database engine

MySQL/MariaDB

Plugins installed

No response

Issue description

According to the official Winter CMS documentation, passing an array of contextual data to the log methods should be "formatted and displayed with the log message":

php
Log::info('User failed to login.', ['id' => $user->id]);

However, when viewing the log entry in the backend System → Logs → Event Log, only the message string is visible. The contextual array does not appear anywhere in the backend interface.

Steps to replicate

Add the following code anywhere in a plugin or theme:

php
Log::info('Test contextual log', ['status' => 200, 'body' => 'Test response']);
Trigger the code (e.g., visit a page or run a component)

Go to Backend → System → Logs → Event Log

Find the newly created log entry and click to view it

Observe that only "Test contextual log" is visible — no status or body data

Workaround

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions