Skip to content

Conversation

@ancheetah
Copy link
Collaborator

@ancheetah ancheetah commented Feb 11, 2026

JIRA Ticket

Description

Fixes double logging when using custom logger. Custom logger should override default console logs.

Summary by CodeRabbit

  • Refactor

    • Adjusted logging dispatch so configured custom loggers are invoked consistently.
  • Bug Fixes

    • Resolved double logging and ensured a provided custom logger now takes precedence over console output (console fallback is no longer invoked when a custom logger is present).

@changeset-bot
Copy link

changeset-bot bot commented Feb 11, 2026

🦋 Changeset detected

Latest commit: ad81c13

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
@forgerock/sdk-logger Patch
@forgerock/davinci-client Patch
@forgerock/journey-client Patch
@forgerock/oidc-client Patch
@forgerock/device-client Patch
@forgerock/protect Patch
@forgerock/sdk-types Patch
@forgerock/sdk-utilities Patch
@forgerock/iframe-manager Patch
@forgerock/sdk-oidc Patch
@forgerock/sdk-request-middleware Patch
@forgerock/storage Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

📝 Walkthrough

Walkthrough

Modified the logger fallback dispatch in one file: replaced logical-OR fallbacks with explicit ternary checks so a provided custom logger is invoked (and its falsy return no longer triggers the console fallback).

Changes

Cohort / File(s) Summary
Logger Fallback Logic
packages/sdk-effects/logger/src/lib/logger.effects.ts
Replaced `custom?.fn(...)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐇 I hopped through branches, ternary in paw,

Custom voices first, no console encore.
A tidy leap where ORs once sprawled,
Falsy returns keep silence — neat and small.

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description addresses the core issue (double logging with custom logger) but omits key template sections and lacks changelog confirmation. Confirm whether a changeset was added (mentioned in template) and optionally provide a JIRA ticket reference if applicable.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix(logger): fix custom logger' is directly related to the main change—fixing custom logger behavior to prevent double logging.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-custom-logger

No actionable comments were generated in the recent review. 🎉


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.

@nx-cloud
Copy link
Contributor

nx-cloud bot commented Feb 11, 2026

View your CI Pipeline Execution ↗ for commit ad81c13

Command Status Duration Result
nx affected -t build lint test e2e-ci ✅ Succeeded 3m 2s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-11 15:35:15 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 11, 2026

Open in StackBlitz

@forgerock/davinci-client

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/davinci-client@528

@forgerock/device-client

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/device-client@528

@forgerock/journey-client

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/journey-client@528

@forgerock/oidc-client

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/oidc-client@528

@forgerock/protect

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/protect@528

@forgerock/sdk-types

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/sdk-types@528

@forgerock/sdk-utilities

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/sdk-utilities@528

@forgerock/iframe-manager

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/iframe-manager@528

@forgerock/sdk-logger

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/sdk-logger@528

@forgerock/sdk-oidc

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/sdk-oidc@528

@forgerock/sdk-request-middleware

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/sdk-request-middleware@528

@forgerock/storage

pnpm add https://pkg.pr.new/ForgeRock/ping-javascript-sdk/@forgerock/storage@528

commit: ad81c13

@codecov-commenter
Copy link

codecov-commenter commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 18.83%. Comparing base (b89ad58) to head (ad81c13).
⚠️ Report is 35 commits behind head on main.

❌ Your project status has failed because the head coverage (18.83%) is below the target coverage (40.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #528      +/-   ##
==========================================
+ Coverage   18.79%   18.83%   +0.03%     
==========================================
  Files         140      142       +2     
  Lines       27640    27732      +92     
  Branches      980      993      +13     
==========================================
+ Hits         5195     5223      +28     
- Misses      22445    22509      +64     
Files with missing lines Coverage Δ
...kages/sdk-effects/logger/src/lib/logger.effects.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 11, 2026

Deployed 8400da4 to https://ForgeRock.github.io/ping-javascript-sdk/pr-528/8400da49979432c260108d4c1bf7cf0b9de5fa35 branch gh-pages in ForgeRock/ping-javascript-sdk

@github-actions
Copy link
Contributor

github-actions bot commented Feb 11, 2026

📦 Bundle Size Analysis

📦 Bundle Size Analysis

🚨 Significant Changes

🔻 @forgerock/journey-client - 0.0 KB (-82.5 KB, -100.0%)

📊 Minor Changes

📉 @forgerock/journey-client - 82.5 KB (-0.0 KB)
📈 @forgerock/sdk-logger - 1.6 KB (+0.0 KB)

➖ No Changes

@forgerock/device-client - 9.3 KB
@forgerock/oidc-client - 23.5 KB
@forgerock/protect - 150.1 KB
@forgerock/sdk-utilities - 8.5 KB
@forgerock/sdk-types - 7.9 KB
@forgerock/storage - 1.5 KB
@forgerock/iframe-manager - 2.4 KB
@forgerock/sdk-request-middleware - 4.5 KB
@forgerock/sdk-oidc - 2.6 KB
@forgerock/davinci-client - 39.8 KB


13 packages analyzed • Baseline from latest main build

Legend

🆕 New package
🔺 Size increased
🔻 Size decreased
➖ No change

ℹ️ How bundle sizes are calculated
  • Current Size: Total gzipped size of all files in the package's dist directory
  • Baseline: Comparison against the latest build from the main branch
  • Files included: All build outputs except source maps and TypeScript build cache
  • Exclusions: .map, .tsbuildinfo, and .d.ts.map files

🔄 Updated automatically on each push to this PR

@ancheetah ancheetah merged commit d692385 into main Feb 11, 2026
8 checks passed
@ancheetah ancheetah deleted the fix-custom-logger branch February 11, 2026 17:08
@ryanbas21 ryanbas21 mentioned this pull request Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants