Skip to content

Conversation

jdimovska
Copy link
Contributor

@jdimovska jdimovska commented Oct 13, 2025

💡 Overview

  • Migrated usage of getLogger to new syntax where the first tag is considered as scope and the subsequent are tags.

  • Introduced new configuration option: logOptions?: ConfigureLoggersOptions<string> which allows the consumers to configure the loggers per scope

  • Marked logger and logLevel as deprecated and in first implementation setting them as default level and level in configureLoggers

📝 Implementation notes

📑 Docs: https://github.com/GetStream/docs-content/pull/

# Conflicts:
#	packages/client/package.json
#	sample-apps/react-native/dogfood/src/components/BottomControlsDrawer.tsx
#	yarn.lock
Comment on lines +40 to +41
logger: Logger,
level: LogLevel,
Copy link
Contributor

Choose a reason for hiding this comment

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

It'd be good to add a function description which mentions that these two arguments set the default scope and that providing a different value in the config (third argument) might override these two, let's also deprecate the signature in favor of using the one coming from the package.

Comment on lines 98 to 102
setLogger(
rootLogger,
clientOptions?.logLevel || 'warn',
clientOptions?.logOptions,
);
Copy link
Contributor

Choose a reason for hiding this comment

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

We can probably use the new signature here since it's our code.

Comment on lines +201 to 203
console.warn(
'[filters] Filter encountered an error and will be disabled',
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we sinking logs to console here? 🤔

- set deprecated on setLogger level and use the new configuration
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