How to use the @optimizely/js-sdk-logging.LogLevel.NOTSET function in @optimizely/js-sdk-logging

To help you get started, we’ve selected a few @optimizely/js-sdk-logging 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 / javascript-sdk / packages / optimizely-sdk / lib / plugins / logger / index.react_native.js View on Github external
ReactNativeLogger.prototype.log = function(level, message) {
  var formattedMessage = sprintf('[OPTIMIZELY] - %s %s %s', getLogLevelName(level), new Date().toISOString(), message);
  switch (level) {
    case LogLevel.INFO: console.info(formattedMessage); break;
    case LogLevel.ERROR:
    case LogLevel.WARNING: console.warn(formattedMessage); break;
    case LogLevel.DEBUG:
    case LogLevel.NOTSET: console.log(formattedMessage); break;
  }
};