Skip to content

Conversation

@kasey-alusi-vcc
Copy link

@kasey-alusi-vcc kasey-alusi-vcc commented Oct 15, 2025

Description

This PR adds a new environment variable PRETTY_LOGS_ENABLED to be able to override the default log format with JSON formatted logs. Default behavior will remain pino-pretty. JSON logging can be set with PRETTY_LOGS_ENABLED=false.

Fixes: #4498

Testing Guide

  1. Tested by running the service with PRETTY_LOGS_ENABLED=false, validating that log messages are in json format.
  2. Also tested without PRETTY_LOGS_ENABLED set at all, and confirmed that there is no change in log format.

Checklist

  • I've assigned an assignee to this PR and related issue(s) (if applicable)
  • I've assigned a label to this PR and related issue(s) (if applicable)
  • I've assigned a milestone to this PR and related issue(s) (if applicable)
  • I've updated documentation (code comments, README, etc. if applicable)
  • I've done sufficient testing (unit, integration, etc.)

@kasey-alusi-vcc kasey-alusi-vcc requested review from a team as code owners October 15, 2025 16:32
@quiet-node quiet-node added the internal For changes that affect the project's internal workings but not its outward-facing functionality. label Oct 16, 2025
@quiet-node quiet-node added this to the 0.73.0 milestone Oct 16, 2025
Copy link
Contributor

@quiet-node quiet-node left a comment

Choose a reason for hiding this comment

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

Thanks @kasey-alusi-vcc! Nice work and LG so far just 1 item

Signed-off-by: kasey-alusi-vcc <[email protected]>
Copy link
Contributor

@simzzz simzzz left a comment

Choose a reason for hiding this comment

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

LG, could you also add this new var to the .env example files env.http.example and env.ws.example?

@quiet-node
Copy link
Contributor

Hey @kasey-alusi-vcc, there was an issue where a Dependabot PR corrupted the package-lock.json file, which caused all the current CI failures. The fix has been merged into main, so could you please do a quick rebase to get the CIs running again? Sorry for the inconvenience

@Ferparishuertas Ferparishuertas self-requested a review October 29, 2025 15:46
Copy link
Contributor

@Ferparishuertas Ferparishuertas left a comment

Choose a reason for hiding this comment

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

LGTM

@konstantinabl konstantinabl modified the milestones: 0.73.0, 0.74.0 Oct 30, 2025
@kasey-alusi-vcc
Copy link
Author

Hi @konstantinabl can you review this PR?

@konstantinabl konstantinabl requested a review from simzzz November 3, 2025 09:43
@codecov
Copy link

codecov bot commented Nov 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

❌ Your project check has failed because the head coverage (64.15%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.

❗ There is a different number of reports uploaded between BASE (d193bda) and HEAD (809debd). Click for more details.

HEAD has 22 uploads less than BASE
Flag BASE (d193bda) HEAD (809debd)
config-service 1 0
relay 1 0
19 1
server 1 0
ws-server 1 0
@@             Coverage Diff             @@
##             main    #4474       +/-   ##
===========================================
- Coverage   95.41%   64.15%   -31.27%     
===========================================
  Files         127      127               
  Lines       20447    20457       +10     
  Branches     1754      404     -1350     
===========================================
- Hits        19510    13124     -6386     
- Misses        918     7326     +6408     
+ Partials       19        7       -12     
Flag Coverage Δ
config-service ?
relay ?
server ?
ws-server ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ckages/config-service/src/services/globalConfig.ts 100.00% <100.00%> (ø)
packages/server/src/server.ts 59.24% <100.00%> (-28.34%) ⬇️

... and 74 files with indirect coverage changes

🚀 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal For changes that affect the project's internal workings but not its outward-facing functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ENV var to use JSON logging

7 participants