Repository navigation
Show human-readable timestamps in the server and daemon log viewer - #3454
Merged
Merged
Conversation
Format pino JSON log lines as "YYYY-MM-DD HH:mm:ss.SSS [level] [component] msg {fields}"
using local time, falling back to the raw line for non-pino output.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
The desktop "Open server and daemon logs" viewer printed raw pino JSON lines prefixed with
[server]/[host-daemon], so timestamps showed as epoch milliseconds ("time":1789079985901) and levels as numbers ("level":40), making the log hard to scan.What changed
apps/desktop/src/log-viewer.ts: newformatLogLineparses each tailed line as a pino record and rendersYYYY-MM-DD HH:mm:ss.SSS [level] [component] msg {remaining fields}in local time.componentis omitted when it matches the log file's component and shown as[host-daemon:<sub>]otherwise. Non-pino lines fall back to the previous[component] <raw line>format. Copy Logs uses the formatted text.Example:
How you verified
formatLogLinetests inapps/desktop/test/log-viewer.test.ts(pino formatting, core-only records, differing sub-component, non-JSON / non-pino fallback);vitest run test/log-viewer.test.tspasses (11 tests).pnpm exec turbo run typecheck --filter=@bb/desktoppasses.🤖 Generated with Claude Code