Skip to content

Conversation

@patricklafrance
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings August 20, 2025 17:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR makes logger segments optional by changing the withText, withError, and withObject methods to accept optional parameters and only log entries when values are provided.

  • Made text, error, and object parameters optional in logger interface methods
  • Added conditional checks to prevent logging when parameters are undefined
  • Updated tests to verify the new optional behavior and reorganized existing test cases

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/logging/src/Logger.ts Updated interface to make withText, withError, and withObject parameters optional
packages/logging/src/BrowserConsoleLogger.ts Added conditional checks and parameter optionality for logging methods
packages/logging/src/CompositeLogger.ts Added conditional checks and parameter optionality for composite logger methods
packages/logging/tests/BrowserConsoleLogger.test.ts Added tests for undefined parameters and reorganized existing test cases
packages/logging/tests/CompositeLogger.test.ts Added tests for undefined parameters and updated test data
.changeset/icy-worms-open.md Added changeset documentation for the feature

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Aug 20, 2025

Open in StackBlitz

pnpm add https://pkg.pr.new/workleap/wl-logging/@workleap/logging@18

commit: 1e1eec3

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@patricklafrance patricklafrance merged commit 8e4a1f7 into main Aug 20, 2025
3 of 4 checks passed
@github-actions github-actions bot mentioned this pull request Aug 20, 2025
@patricklafrance patricklafrance deleted the feat/segments-are-now-optionnal branch October 9, 2025 16:11
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.

2 participants