Skip to content

Fix dev and pino logger - #432

Merged
Bohreromir merged 2 commits into
mainfrom
fix/pino-10.4-logger
Oct 30, 2026
Merged

Bohreromir merged 2 commits into
mainfrom
fix/pino-10.4-logger

Conversation

@Bohreromir

@Bohreromir Bohreromir commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Description

Updated pino logger wants to be imported in a different way and broke our dev setup

Docs

Release note

Checklist

Author

  • AI review done, findings addressed
  • Tests added or updated
  • Changelog updated (if the repo keeps one)

Reviewer

  • Useful comments and logging
  • Docs added or updated per the style guide

Acceptance

  • Check for release notes and docs

Since pino 10.4.0 the transport caller is detected via util.getCallSites(),
which returns an empty script name for modules evaluated by Vite's SSR module
runner. pino then cannot resolve 'pino-pretty' and `npm run dev` fails with
"unable to determine transport target". Resolve the target to an absolute path
ourselves.

knip now sees pino-pretty as used, so drop it from ignoreDependencies.
A per-target `level` makes pino route logs through multistream, which since
pino 10.4.0 warns about our custom `formatters.level`
(PINO_TRANSPORT_MULTI_TARGETS_LEVEL_FORMATTER). A single target needs no level
as the logger already filters. Keep it for multiple targets (LOG_JSON_FILE),
where multistream would otherwise default targets to 'info' and drop debug logs.
@github-actions

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 67.31% 9114 / 13540
🔵 Statements 66.28% 12276 / 18521
🔵 Functions 68.12% 2941 / 4317
🔵 Branches 57.33% 5152 / 8986
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/lib/server/logging/logger.ts 80% 64.28% 100% 84.21% 47, 51-54, 62
Generated in workflow #1216 for commit 23f2951 by the Vitest Coverage Report Action

@Bohreromir Bohreromir self-assigned this Oct 30, 2026
@Bohreromir Bohreromir moved this to Development: Waiting for Review in Stackable Engineering Oct 30, 2026
@Bohreromir
Bohreromir marked this pull request as ready for review October 30, 2026 13:16

@lfrancke lfrancke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I already gave a demo with this so I know it works :) And from what I understand from the code it also looks fine. Thanks!

@lfrancke lfrancke moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Oct 30, 2026
@Bohreromir
Bohreromir added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 81bbf7a Oct 30, 2026
12 checks passed
@Bohreromir
Bohreromir deleted the fix/pino-10.4-logger branch October 30, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: In Review

Development

Successfully merging this pull request may close these issues.

2 participants