Update-available notice should be printed to stdout, not stderr (causes log aggregators to flag it as `error`)
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- nodejs, typescript
- Domain
- cli
Research direction
Inspect the update-printer, likely packages/cli/src/utils/printUpdateMessage.ts, and compare it with the bundled function H1e in node_modules/prisma/build/index.js. Reproduce the notice with the two consecutive prisma validate commands, then verify that the informational update notice is emitted on stdout rather than stderr.
Written by the indexing model from the issue text.
Description
Bug description
The "Update available" notice that the Prisma CLI prints when a new version is available is sent to stderr via console.error(). In container/CI environments, log aggregators (Datadog, GCP Cloud Logging, AWS CloudWatch, Loki, etc.) classify any line on stderr as severity error by default. This means an informational update notice surfaces in observability tools as a recurring error, which is misleading and pollutes alerting/dashboards.
The notice is informational by nature — it doesn't reflect a failure of the user's command. It should be printed to stdout so log aggregators classify it as info.
How to reproduce
Run any Prisma CLI command that succeeds twice (the first run populates the checkpoint cache; the second run prints the notice if an update is available). For example, in a container:
docker run --rm node:24.14.0-alpine3.22 sh -c '
mkdir /app && cd /app
cat > schema.prisma <<EOS
datasource db { provider = "postgresql" url = "postgresql://x:y@host:5432/db" }
generator client { provider = "prisma-client-js" }
EOS
npx --yes prisma@6.19.2 validate
npx --yes prisma@6.19.2 validate
' 2>/dev/null # discard stdout — notice still appears, proving it is on stderr
Or directly inspect the bundled CLI source — the print function in node_modules/prisma/build/index.js (function H1e in 6.19.2) ends with:
let p = _w({ height: n, width: 59, str: l, horizontalPadding: 2 });
console.error(p); // <-- stderr
Expected behavior
The update notice should be printed to stdout (console.log or process.stdout.write). It is informational, not an error.
Why this matters
In production deployments using log aggregators that key on stream:
- Datadog Agent's docker log integration marks every stderr line as
status:errorby default. Result: the box-drawing notice shows up in Datadog as a recurringerror-severity event every time a new container starts and runsprisma migrate deploy. - Similar behavior in Loki/Promtail (
level=error), AWS CloudWatch (with default JSON parsers), and GCP Cloud Logging (severity: ERRORfor stderr).
This causes false-positive "errors" in dashboards, alerts, and monitor queries, even though Prisma is functioning normally.
Workarounds users currently rely on
- Set
PRISMA_HIDE_UPDATE_MESSAGE=true— works, but suppresses the notice entirely (defeats the purpose of having it). - Redirect stderr to stdout in the container entrypoint (
2>&1) — works for the notice, but also collapses real errors to stdout, which is worse. - Add a custom log-pipeline rule in the aggregator that re-tags messages matching
/Update available .* -> .*/to severityinfo— surgical, but lives outside the application repo and adds operational complexity per environment.
A single-character fix in Prisma (console.error → console.log) would eliminate the need for any of these workarounds.
Suggested change
In the update-printer (H1e in 6.19.2's bundled build/index.js, source likely in packages/cli/src/utils/printUpdateMessage.ts or similar):
- console.error(p)
+ console.log(p)
Environment & setup
- OS: Alpine Linux 3.22 (any container OS reproduces)
- Node.js: v24.14.0
- Prisma version: 6.19.2 (verified — same code path exists in current main per the bundled source)
Prisma Version
prisma : 6.19.2
@prisma/client : 6.19.2
- Dominant language
- TypeScript
- Stars
- 47.6k
- Forks
- 2.5k
- Avg merge
- 22h 54m
- Merged PRs (30d)
- 93
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from prisma/orm
-
fix(mongo-orm): .select() combined with .include() drops joined relation fields via $project stage Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100