Skip to content

Fix core logger to log error objects properly#2864

Merged
gerteck merged 1 commit intoMarkBind:masterfrom
Harjun751:winston-error-fix
Mar 22, 2026
Merged

Fix core logger to log error objects properly#2864
gerteck merged 1 commit intoMarkBind:masterfrom
Harjun751:winston-error-fix

Conversation

@Harjun751
Copy link
Contributor

@Harjun751 Harjun751 commented Mar 21, 2026

What is the purpose of this pull request?

  • Documentation update
  • Bug fix
  • Feature addition or enhancement
  • Code maintenance
  • DevOps
  • Improve developer experience
  • Others, please explain:

Overview of changes:
Updates winston configuration in core to properly handle error objects in logging.

Anything you'd like to highlight/discuss:
nil

Testing instructions:
nil

Proposed commit message: (wrap lines at 72 characters)
Fix core logger to log error objects properly


Checklist: ☑️

  • Updated the documentation for feature additions and enhancements
  • Added tests for bug fixes or features
  • Linked all related issues
  • No unrelated changes

Reviewer checklist:

Indicate the SEMVER impact of the PR:

  • Major (when you make incompatible API changes)
  • Minor (when you add functionality in a backward compatible manner)
  • Patch (when you make backward compatible bug fixes)

At the end of the review, please label the PR with the appropriate label: r.Major, r.Minor, r.Patch.

Breaking change release note preparation (if applicable):

  • To be included in the release note for any feature that is made obsolete/breaking

Give a brief explanation note about:

  • what was the old feature that was made obsolete
  • any replacement feature (if any), and
  • how the author should modify his website to migrate from the old feature to the replacement feature (if possible).

When logging error objects without transformation
winston logs `undefined`

To improve traceability,

Update console logging format and winston
configuration to use `format.errors` to
log a stack trace.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the core Winston logger configuration so Error objects are formatted correctly (including stack traces) when logged.

Changes:

  • Adds Winston’s format.errors({ stack: true }) to the console log format pipeline.
  • Moves the format configuration from the Console transport to the global winston.configure() options.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Mar 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.99%. Comparing base (76b489e) to head (0aeba79).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2864   +/-   ##
=======================================
  Coverage   71.99%   71.99%           
=======================================
  Files         132      132           
  Lines        7352     7352           
  Branches     1534     1633   +99     
=======================================
  Hits         5293     5293           
  Misses       1958     1958           
  Partials      101      101           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@gerteck gerteck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for catching this

@gerteck gerteck merged commit 341b94d into MarkBind:master Mar 22, 2026
15 checks passed
@github-actions github-actions bot added the r.Patch Version resolver: increment by 0.0.1 label Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

r.Patch Version resolver: increment by 0.0.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants