Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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;
}
};