Skip to content

Remove logger name field from all records - #206

Merged
tobie merged 1 commit into
mainfrom
claude/pr-preview-logging-ifwpri
Sep 7, 2026
Merged

tobie merged 1 commit into
mainfrom
claude/pr-preview-logging-ifwpri

Conversation

@tobie

@tobie tobie commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Removes the hardcoded pr-preview name field from all logger records, simplifying the logging output since the process itself is the whole app and doesn't need to identify itself in every log line.

Changes

  • Removed the NAME = "pr-preview" constant and stopped setting the name option when creating the pino logger
  • Updated test assertions to no longer expect the name field in log records
  • Updated the pretty-print regex pattern to remove (pr-preview) from the expected log line format
  • Updated documentation to reflect that records no longer include a name field, as the process is the whole application

Details

The logger previously added a name: "pr-preview" field to every record, which was redundant since this application is the entire process. By removing this field, log output becomes cleaner and more concise, especially in pretty-printed format where the level and PR/action information are already sufficient context.

https://claude.ai/code/session_01ESNyrfgCbty7Vui7uXRuKr

Every record was named pr-preview, which pino-pretty printed as
"(pr-preview)" after the level on every line. The process is the whole
app, so the name says nothing the reader doesn't already know, in the
pretty output or in the JSON. Remove it from the records rather than
hiding it in one format.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ESNyrfgCbty7Vui7uXRuKr
@tobie
tobie merged commit 2356b81 into main Sep 7, 2026
1 check passed
@tobie
tobie deleted the claude/pr-preview-logging-ifwpri branch September 7, 2026 10:17
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