Skip to content

@W-22653658 prettier log tailing in vs extension#517

Open
charithaT07 wants to merge 2 commits into
mainfrom
W-22653658-vs-extension-prettier-log-tailing
Open

@W-22653658 prettier log tailing in vs extension#517
charithaT07 wants to merge 2 commits into
mainfrom
W-22653658-vs-extension-prettier-log-tailing

Conversation

@charithaT07

@charithaT07 charithaT07 commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Brief description of what this PR does.

Prettier log viewing in the B2C Logs output

What

Tidies up how tailed logs render in the B2C Logs output panel. Same channel, same start/stop commands — just nicer to read.

  • Log entries are now color-coded by level (error red, warn yellow, info, debug) and get a built-in level-filter dropdown, by switching the output to a LogOutputChannel.
  • Multi-line stack traces are indented so each entry reads as one block instead of a wall of text.
  • Entries from a log whose prefix differs from its level are tagged with their source (e.g. [customerror]), so you can tell which log a line came from. The tag is hidden when it would just repeat the level (no more [error] [error]).

Why

While tailing, it was hard to tell entries apart, to scan for errors at a glance, or to know which log file a line came from. This makes the existing feature readable without changing how you use it.

Notes

  • No new output channel, command, or panel — purely an improvement to the existing one.
  • We rely on VS Code's own per-entry timestamp and drop the server's GMT timestamp to avoid a confusing double-timestamp. For live tailing these are seconds apart; for older/rotated entries the shown time reflects when it was polled.

Testing

  • Typecheck, lint, and build pass for b2c-vs-extension.
  • Manually verified in the Extension Development Host: levels colored correctly, source tags show only when useful, stack traces grouped, and cartridge paths remain click-to-open.

Files

  • packages/b2c-vs-extension/src/logs/logs-tail.ts
  • .changeset/prettier-log-tailing.md

Dependencies

  • No net-new third-party dependencies were added
  • If net-new third-party dependencies were added, rationale/discussion is included and 3pl-approved is set by a maintainer

  • Tests pass (pnpm test)
  • Code is formatted (pnpm run format)

@charithaT07 charithaT07 marked this pull request as ready for review June 19, 2026 14:54
@clavery

clavery commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

We rely on VS Code's own per-entry timestamp and drop the server's GMT timestamp to avoid a confusing double-timestamp. For live tailing these are seconds apart; for older/rotated entries the shown time reflects when it was polled.

@charithaT07 can we look for another approach here that doesn't drop the server timestamps. That's information we need to be highly accurate

@charithaT07 charithaT07 marked this pull request as draft June 23, 2026 17:04
@charithaT07 charithaT07 force-pushed the W-22653658-vs-extension-prettier-log-tailing branch from 76656c4 to 7809ffd Compare June 23, 2026 17:21
@charithaT07 charithaT07 marked this pull request as ready for review June 23, 2026 17:25
@charithaT07

Copy link
Copy Markdown
Collaborator Author

We rely on VS Code's own per-entry timestamp and drop the server's GMT timestamp to avoid a confusing double-timestamp. For live tailing these are seconds apart; for older/rotated entries the shown time reflects when it was polled.

@charithaT07 can we look for another approach here that doesn't drop the server timestamps. That's information we need to be highly accurate

Sure @clavery . Updated to keep the server GMT timestamp as the leading value on each entry .

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.

2 participants