fix(logs): filter --level client-side when the backend ignores it#561
Open
yoavf wants to merge 1 commit into
Open
fix(logs): filter --level client-side when the backend ignores it#561yoavf wants to merge 1 commit into
yoavf wants to merge 1 commit into
Conversation
Per-app Cloudflare deployments return the full app log stream and drop the level query param, so --level silently showed every level. Filter the returned entries client-side against the requested level; entry levels are already normalized by the response schema, so warn entries match --level warning. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.1.2-pr.561.234c4edPrefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.1.2-pr.561.234c4ed"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.1.2-pr.561.234c4ed"
}
}
Preview published to npm registry — try new features instantly! |
ImriKochWix
approved these changes
Jul 8, 2026
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.
Note
Description
The
base44 logs --level <level>filter relied on the backend to honor thelevelquery parameter, but not every runtime does — per-app Cloudflare deployments ignore it and return the full log stream. This PR adds a defensive client-side filter so--levelis always respected regardless of backend behavior, using the schema-normalized entry levels for the comparison.Related Issue
None
Type of Change
Changes Made
fetchLogsForFunctions, filter fetched log entries byfilters.levelclient-side before normalizing/appending them, so results match the requested level even when the backend ignores the query param.warn→warning) so the comparison stays correct.warn→warningentries when filtering by--level warning.Testing
npm test)Checklist
docs/(AGENTS.md) if I made architectural changesAdditional Notes
The filter is intentionally defensive: when the backend does correctly filter by level, this is a no-op; when it does not, the CLI now enforces the requested level. Level comparison uses the already-normalized values from the response schema.
🤖 Generated by Claude | 2026-07-07 08:18 UTC | 234c4ed