Skip to content

Conversation

@dahlia
Copy link
Member

@dahlia dahlia commented Jul 6, 2025

  • Fixed bug where multiple JSON objects were written on single line in log files
  • Upgraded LogTape from 0.10 to 1.0 for better JSON Lines support
  • Use jsonLinesFormatter instead of JSON.stringify() for proper formatting
  • Ensures one JSON object per line when LOG_FILE is set

- Fixed bug where multiple JSON objects were written on single line in log files
- Upgraded LogTape from 0.10 to 1.0 for better JSON Lines support
- Use jsonLinesFormatter instead of JSON.stringify for proper formatting
- Ensures one JSON object per line when LOG_FILE is set
@dahlia dahlia requested review from ThisIsMissEm and Copilot July 6, 2025 15:22
@dahlia dahlia added the bug Something isn't working label Jul 6, 2025
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

This PR fixes a logging bug by ensuring each JSON object is written on its own line and upgrades LogTape dependencies to v1.0.

  • Replace JSON.stringify with jsonLinesFormatter for proper JSON Lines formatting in src/logging.ts.
  • Bump @logtape/file, @logtape/logtape, and @logtape/sentry to v1.0.4 in package.json.
  • Update CHANGES.md to document the JSON Lines fix and new LogTape version.

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
src/logging.ts Use jsonLinesFormatter for file sink to ensure one JSON object per line.
package.json Upgrade @logtape/* packages from v0.10 to v1.0.4.
CHANGES.md Add a changelog entry for the JSON Lines fix and link the corresponding PR (#174).
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (2)

src/logging.ts:32

  • Consider adding a unit or integration test to verify that logs are correctly formatted as JSON Lines when LOG_FILE is set, preventing future regressions.
            formatter: jsonLinesFormatter,

CHANGES.md:22

  • Indentation for the new link reference is inconsistent with existing entries; consider prefixing two spaces to align with other reference links.
[#174]: https://github.com/fedify-dev/hollo/pull/174

@dahlia dahlia merged commit b61049a into fedify-dev:main Jul 7, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant