Skip to content

Conversation

@ParidelPooya
Copy link
Contributor

@ParidelPooya ParidelPooya commented Nov 12, 2025

Replace setCustomLogger() with configureLogger() that accepts LoggerConfig
object with customLogger and modeAware options. The modeAware flag controls
whether logs are suppressed during replay mode (default: true).

BREAKING CHANGE: Removed setCustomLogger() method in favor of configureLogger().
This is acceptable as the SDK has not been launched yet and there are no existing users.

Changes:
- Add configureLogger(config: LoggerConfig) method to DurableContext
- Add LoggerConfig interface with customLogger and modeAware properties
- Update createModeAwareLogger to accept modeAwareEnabled parameter
- Change default modeAware behavior to true (suppress logs during replay)
- Fix replay mode switching for backend-completed operations (wait, invoke,
  createCallback, waitForCallback) by calling checkAndUpdateReplayMode() after completion
- Update all tests to reflect new default behavior and mode switching fix
- Add logger-test examples with file-based logging (local-only tests)
- Update documentation: README, API_SPECIFICATION.md with new API
- Add TSDoc comments for Logger types and configureLogger method
- Remove old logger-example with outdated information

Limitation:
Integration tests are against local runner and we have a issue to add it to Cloud mode: #255

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ParidelPooya ParidelPooya force-pushed the feat/sdk-configure-logger-api branch 23 times, most recently from 02b005a to f7aa59b Compare November 12, 2025 22:39
Replace setCustomLogger() with configureLogger() that accepts LoggerConfig
object with customLogger and modeAware options. The modeAware flag controls
whether logs are suppressed during replay mode (default: true).

BREAKING CHANGE: Removed setCustomLogger() method in favor of configureLogger().
This is acceptable as the SDK has not been launched yet and there are no existing users.

Changes:
- Add configureLogger(config: LoggerConfig) method to DurableContext
- Add LoggerConfig interface with customLogger and modeAware properties
- Update createModeAwareLogger to accept modeAwareEnabled parameter
- Change default modeAware behavior to true (suppress logs during replay)
- Fix replay mode switching for backend-completed operations (wait, invoke,
  createCallback, waitForCallback) by calling checkAndUpdateReplayMode() after completion
- Update all tests to reflect new default behavior and mode switching fix
- Add logger-test examples with file-based logging (local-only tests)
- Update documentation: README, API_SPECIFICATION.md with new API
- Add TSDoc comments for Logger types and configureLogger method
- Remove old logger-example with outdated information
@ParidelPooya ParidelPooya force-pushed the feat/sdk-configure-logger-api branch from f7aa59b to dabee4e Compare November 12, 2025 22:46
- Replace async/await pattern with finally blocks in invoke, wait, createCallback, waitForCallback
- Add optional chaining for promise.finally() to handle undefined promises
- Add README tip about modeAware: false for local development/debugging
@ParidelPooya ParidelPooya merged commit eb0c30c into development Nov 13, 2025
7 checks passed
@ParidelPooya ParidelPooya deleted the feat/sdk-configure-logger-api branch November 13, 2025 01:04
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