Skip to content

Commit 19b3042

Browse files
Use log level when logger is set
1 parent 79cd367 commit 19b3042

File tree

5 files changed

+22
-15
lines changed

5 files changed

+22
-15
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
11.7.1 (October 8, 2025)
2+
- Bugfix - Updated @splitsoftware/splitio-commons package to version 2.7.1, which fixes the `debug` option to support log levels when the `logger` option is used.
3+
14
11.7.0 (October 7, 2025)
25
- Added support for custom loggers: added `logger` configuration option and `factory.Logger.setLogger` method to allow the SDK to use a custom logger.
36
- Updated @splitsoftware/splitio-commons package to version 2.7.0.

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@splitsoftware/splitio",
3-
"version": "11.7.0",
3+
"version": "11.7.1",
44
"description": "Split SDK",
55
"files": [
66
"README.md",
@@ -38,7 +38,7 @@
3838
"node": ">=14.0.0"
3939
},
4040
"dependencies": {
41-
"@splitsoftware/splitio-commons": "2.7.0",
41+
"@splitsoftware/splitio-commons": "2.7.1",
4242
"bloom-filters": "^3.0.4",
4343
"ioredis": "^4.28.0",
4444
"js-yaml": "^3.13.1",

src/__tests__/offline/node.spec.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ tape('Node.js Offline Mode', function (t) {
7777

7878
const factory = SplitFactory({
7979
...config,
80-
debug: 'ERROR', // enable logs to check the message. If logger is provided, any log level different than 'NONE' will be overridden to 'DEBUG'.
80+
core: {
81+
...config.core,
82+
key: 'ignored' // just set to log a warning
83+
},
84+
debug: 'INFO', // enable logs to check the message.
8185
logger: console // use console as custom logger.
8286
});
8387
const client = factory.client();
@@ -92,9 +96,9 @@ tape('Node.js Offline Mode', function (t) {
9296
assert.pass('If tried to load a file with invalid extension, we should emit SDK_READY_TIMED_OUT.');
9397

9498
assert.ok(console.error.calledWithMatch(`splitio => sync:offline: There was an issue loading the mock feature flags data. No changes will be applied to the current cache. Error: Invalid extension specified for feature flags mock file. Accepted extensions are ".yml" and ".yaml". Your specified file is ${config.features}`));
95-
assert.notOk(console.warn.called, 'warn should not be called');
99+
assert.ok(console.warn.calledWithMatch('splitio => Provided `key` is ignored in server-side SDK.'));
96100
assert.ok(console.info.called, 'info should be called');
97-
assert.ok(console.debug.called, 'debug should be called');
101+
assert.notOk(console.debug.called, 'debug should not be called');
98102

99103
console.error.restore();
100104
console.warn.restore();

src/settings/defaults/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const packageVersion = '11.7.0';
1+
export const packageVersion = '11.7.1';

0 commit comments

Comments
 (0)