Skip to content

Commit 81269aa

Browse files
authored
fix(log-level) change single audience result to debug (#496)
Summary: Updating audience evaluation log level to be debug. The only info level log will be the one corresponding to the result of overall evaluation of an audience. Test plan: All checks pass.
1 parent f6b3a93 commit 81269aa

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/optimizely-sdk/CHANGELOG.MD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1010
### Bug fixes
1111
- Added definition of `getFeatureVariable` method in TypeScript type definitions
1212
- Fixed return type of `getAllFeatureVariables` method in TypeScript type definitions
13+
- Revisited audience evaluation log level to debug
1314

1415
## [4.0.0] - April 30, 2020
1516

packages/optimizely-sdk/lib/core/audience_evaluator/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { getLogger } from '@optimizely/js-sdk-logging';
1919
import fns from '../../utils/fns';
2020
import {
2121
LOG_LEVEL,
22-
LOG_MESSAGES,
22+
LOG_MESSAGES,
2323
ERROR_MESSAGES,
2424
} from '../../utils/enums';
2525
import conditionTreeEvaluator from '../condition_tree_evaluator';
@@ -76,7 +76,7 @@ AudienceEvaluator.prototype.evaluate = function(audienceConditions, audiencesByI
7676
this.evaluateConditionWithUserAttributes.bind(this, userAttributes)
7777
);
7878
var resultText = result === null ? 'UNKNOWN' : result.toString().toUpperCase();
79-
logger.log(LOG_LEVEL.INFO, sprintf(LOG_MESSAGES.AUDIENCE_EVALUATION_RESULT, MODULE_NAME, audienceId, resultText));
79+
logger.log(LOG_LEVEL.DEBUG, sprintf(LOG_MESSAGES.AUDIENCE_EVALUATION_RESULT, MODULE_NAME, audienceId, resultText));
8080
return result;
8181
}
8282

0 commit comments

Comments
 (0)