---
title: Javascript-SDK - 3.1.0
slug: feature-experimentation/release-notes/javascript-sdk-3-1-0
docTags: 
createdAt: 2026-07-20T15:44:41.584Z
---

\## \[3.1.0] - April 22nd, 2019

\### New Features:

\- Introduced Decision notification listener to be able to record:
\- Variation assignments for users activated in an experiment.
\- Feature access for users.
\- Feature variable value for users.

\### Changed

\* New APIs for setting \`logger\` and \`logLevel\` on the optimizelySDK singleton (\[#232]\([https://github.com/optimizely/javascript-sdk/pull/232](https://github.com/optimizely/javascript-sdk/pull/232)))
\* \`logger\` and \`logLevel\` are now set globally for all instances of Optimizely. If you were passing
different loggers to individual instances of Optimizely, logging behavior may now be different.

\#### Setting a ConsoleLogger

\`\`\`js
var optimizelySDK = require('@optimizely/optimizely-sdk')

// logger and logLevel are now set on the optimizelySDK singleton
optimizelySDK.setLogger(optimizelySDK.logging.createLogger())

// valid levels: 'DEBUG', 'INFO', 'WARN', 'ERROR'
optimizelySDK.setLogLevel('WARN')
// enums can also be used
optimizelySDK.setLogLevel(optimizelySDK.enums.LOG\_LEVEL.ERROR)
\`\`\`

\#### Disable logging

\`\`\`js
var optimizelySDK = require('@optimizely/optimizely-sdk')

optimizelySDK.setLogger(null)
\`\`\`

\### Bug Fixes

\* Feature variable APIs now return default variable value when featureEnabled property is false. (\[#249]\([https://github.com/optimizely/javascript-sdk/pull/249](https://github.com/optimizely/javascript-sdk/pull/249)))

\### Deprecated

\* Activate notification listener is deprecated as of this release. Recommendation is to use the new Decision notification listener. Activate notification listener will be removed in the next major release.

[https://github.com/optimizely/javascript-sdk/releases/tag/v3.1.0](https://github.com/optimizely/javascript-sdk/releases/tag/v3.1.0)
