How to use the @optimizely/optimizely-sdk/lib/plugins/logger.createLogger function in @optimizely/optimizely-sdk

To help you get started, we’ve selected a few @optimizely/optimizely-sdk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github optimizely / isomorphic-react-demo-app / src / common / utils / optimizely_manager.js View on Github external
function _getInstance(datafile) {
  if (!optlyInstance) {
    optlyInstance = optimizely.createInstance({
      datafile,
      logger: optimizelyLoggerFactory.createLogger({
        logLevel: 2,
      }),
      skipJSONValidation: true, // This should be set to false if we modify the datafile in any way
    })
  }
  return optlyInstance
}
github optimizely / isomorphic-react-demo-app / src / client / optimizely_manager.js View on Github external
function _getInstance(datafile) {
  if (!optlyInstance) {
    optlyInstance = optimizely.createInstance({
      datafile,
      logger: optimizelyLoggerFactory.createLogger({
        logLevel: 2,
      }),
      skipJSONValidation: true, // This should be set to false if we modify the datafile in any way
    })
  }
  return optlyInstance
}