Skip to content

OUT-4103: make logs readable - #144

Open
SandipBajracharya wants to merge 5 commits into
feature/performance-improvementsfrom
OUT-4103
Open

OUT-4103: make logs readable#144
SandipBajracharya wants to merge 5 commits into
feature/performance-improvementsfrom
OUT-4103

Conversation

@SandipBajracharya

Copy link
Copy Markdown
Collaborator

What

Cleans up logging so output is readable when debugging.

  • Single logger that bounds object output (nested depth 2, arrays 10 items, strings 512 chars) so one line can't dump a whole payload or file list.
  • LOG_LEVEL env var controls how much prints. Default info. Errors always print and also go to Sentry independent of this.
  • All server console.* calls now go through the logger, so the caps and LOG_LEVEL apply everywhere.
  • Removed the whole-object/array dumps that made logs unreadable.
  • Method-entry breadcrumbs moved to the debug level, so they are off by default and turn back on with LOG_LEVEL=log.

Log levels

log (debug) < info < warn < error. Suggested production value: info.

Testing

  • pnpm typecheck clean, Biome clean.
  • 280 unit + 179 integration tests passing.

🤖 Generated with Claude Code

SandipBajracharya and others added 4 commits August 27, 2026 17:34
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
So LOG_LEVEL and the output caps apply everywhere, not just some call sites.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Drop the whole-object/array dumps that made logs unreadable, and move
method-entry breadcrumbs to the debug level so they are off by default.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Aug 27, 2026

Copy link
Copy Markdown

OUT-4103

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dropbox-integration Ready Ready Preview Aug 27, 2026 12:36pm

Request Review

@greptile-apps

greptile-apps Bot commented Aug 27, 2026

Copy link
Copy Markdown

Greptile Summary

The PR centralizes server logging behind a bounded, level-aware logger and reduces verbose payload output.

  • Adds LOG_LEVEL filtering and bounded object inspection.
  • Routes server console calls through the shared logger.
  • Moves detailed method-entry logging to the debug level.
  • Adds unit coverage for level filtering and output limits.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains.

No blocking failure remains.

Important Files Changed

Filename Overview
src/lib/logger.ts Adds level filtering and bounded single-entry formatting to the shared logger.
src/lib/tests/logger.test.ts Covers filtering defaults and object, array, and string output bounds.
src/features/webhook/dropbox/utils/getDropboxChanges.ts Routes Dropbox validation and retrieval errors through the shared logger.
src/features/sync/lib/Sync.service.ts Replaces direct console calls and reduces verbose SQL-condition logging.

Reviews (2): Last reviewed commit: "fix(OUT-4103): keep each log on one line..." | Re-trigger Greptile

Comment thread src/lib/logger.ts
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@SandipBajracharya

Copy link
Copy Markdown
Collaborator Author

@greptileai review again

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.

1 participant