Skip to content

feat(serverpod_logging): Add isolate-backed IsolatedLogWriter#123

Merged
nielsenko merged 4 commits into
serverpod:mainfrom
nielsenko:feat-isolated-logger
Jun 6, 2026
Merged

feat(serverpod_logging): Add isolate-backed IsolatedLogWriter#123
nielsenko merged 4 commits into
serverpod:mainfrom
nielsenko:feat-isolated-logger

Conversation

@nielsenko
Copy link
Copy Markdown
Contributor

@nielsenko nielsenko commented Jun 5, 2026

Add IsolatedLogWriter

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 5, 2026

Warning

Review limit reached

@nielsenko, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 27 minutes and 22 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: eac603ee-6182-4cd6-bba8-c767e130416b

📥 Commits

Reviewing files that changed from the base of the PR and between 11a7fcf and 74ec856.

📒 Files selected for processing (9)
  • packages/serverpod_logging/CHANGELOG.md
  • packages/serverpod_logging/lib/serverpod_logging.dart
  • packages/serverpod_logging/lib/src/isolated_log_writer.dart
  • packages/serverpod_logging/test/isolated_log_writer_test.dart
  • packages/serverpod_logging/test/log_dispatch_test.dart
  • packages/serverpod_logging/test/log_scope_test.dart
  • packages/serverpod_logging/test/progress_nesting_test.dart
  • packages/serverpod_logging/test/progress_relabel_test.dart
  • packages/serverpod_logging/test/progress_sync_runner_test.dart
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nielsenko nielsenko marked this pull request as ready for review June 5, 2026 18:44
@nielsenko nielsenko force-pushed the feat-isolated-logger branch 5 times, most recently from f2d3880 to 51170c0 Compare June 5, 2026 20:17
@nielsenko nielsenko force-pushed the feat-isolated-logger branch from 51170c0 to b315cea Compare June 5, 2026 21:15
Comment thread packages/serverpod_logging/test/isolated_log_writer_test.dart Outdated
nielsenko added 2 commits June 5, 2026 23:19
- progress_nesting_test: a log emitted inside a progress runner must be
  attributed to the progress scope via the Zone, and a nested progress
  must child under the outer scope.
- progress_relabel_test: progress must never surface the runner's result
  as a scope label (uses a generic recording writer, no terminal rendering).
These fail to compile if the runner is narrowed to Future<T> Function()
@nielsenko nielsenko force-pushed the feat-isolated-logger branch 2 times, most recently from f0f2c2f to d6bb994 Compare June 5, 2026 21:27
Framework-level tests (no CLI rendering):

- Level gating skips the entry factory below the threshold
- Runtime logLevel changes take effect; isDebugEnabled tracks it
- Writer errors are swallowed (dispatch is best-effort)
- Writes serialize in invocation order even when earlier ones are slower
- close() drops any further dispatches
- Convenience methods map to the right level; error() attaches error + stack trace
- Logs emitted outside any progress attach to the synthetic root scope
- progress passes metadata through to the opened scope
- LogScope parent/child: root has no parent; a child keeps its own id/label/metadata
@nielsenko nielsenko force-pushed the feat-isolated-logger branch from d6bb994 to 09d5400 Compare June 5, 2026 21:29
A LogWriter that runs any wrapped writer on a dedicated isolate (via
IsolatedObject), so timer-driven spinners keep animating even when the
calling isolate is blocked.
@nielsenko nielsenko merged commit a9cf5b3 into serverpod:main Jun 6, 2026
20 checks passed
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.

3 participants