Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lifecycle Event Handlers - Add Error Logging #4391

Merged
merged 5 commits into from
Nov 20, 2024

Conversation

adrians5j
Copy link
Member

@adrians5j adrians5j commented Nov 15, 2024

Changes

With this PR, we've added basic error logging during the execution of lifecycle event handlers.

This will help users debug issues because, not only will they be able to see the newly added logs in their CloudWatch, but also, in their browser.

The following example shows a log that happened because of an error that occurred in a onEntryBeforePublish lifecycle event:
Snipaste_2024-11-15_12-34-43

Note

In case you missed it, with the DEBUG env variable set to true, all of the logs that happened during a single API HTTP requests are actually forwarded to user's console.

Note

The DEBUG env variable is usually used with dev and pre-prod Webiny instances.

How Has This Been Tested?

Manually.

Documentation

Changelog.

@adrians5j adrians5j changed the title fix: log errors in lifecycle event handlers Lifecycle Event Handlers - Add Error Logging Nov 15, 2024
@webiny-bot webiny-bot added this to the 5.41.2 milestone Nov 15, 2024
@adrians5j adrians5j marked this pull request as ready for review November 15, 2024 12:50
@adrians5j adrians5j requested a review from Pavel910 November 15, 2024 12:50
@adrians5j adrians5j merged commit 4e11136 into dev Nov 20, 2024
16 checks passed
@adrians5j adrians5j deleted the adrian/lifecycle-events-error-logging branch January 7, 2025 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants