Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wdio/logger

Package Overview
Dependencies
Maintainers
4
Versions
128
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wdio/logger - npm Package Compare versions

Comparing version 5.6.0 to 5.6.3

28

build/node.js

@@ -56,2 +56,3 @@ "use strict";

const loggers = {};
let logLevelsConfig = {};
const logCache = new Set();

@@ -103,3 +104,3 @@ let logFile;

levelFormatter: level => _chalk.default[COLORS[level]](level.toUpperCase()),
nameFormatter: name => _chalk.default.whiteBright(name || 'global')
nameFormatter: name => _chalk.default.whiteBright(name)
});

@@ -115,7 +116,28 @@

let logLevel = process.env.WDIO_LOG_LEVEL || DEFAULT_LEVEL;
const logLevelName = getLogLevelName(name);
if (logLevelsConfig[logLevelName]) {
logLevel = logLevelsConfig[logLevelName];
}
loggers[name] = _loglevel.default.getLogger(name);
loggers[name].setLevel(process.env.WDIO_LOG_LEVEL || DEFAULT_LEVEL);
loggers[name].setLevel(logLevel);
return loggers[name];
}
getLogger.setLevel = (name, level) => loggers[name].setLevel(level);
getLogger.setLevel = (name, level) => loggers[name].setLevel(level);
getLogger.setLogLevelsConfig = (logLevels = {}) => {
logLevelsConfig = {};
Object.keys(logLevels).forEach(loggerName => {
const logLevelName = getLogLevelName(loggerName);
logLevelsConfig[logLevelName] = logLevels[loggerName];
if (loggers[loggerName]) {
loggers[loggerName].setLevel(logLevelsConfig[logLevelName]);
}
});
};
const getLogLevelName = logName => logName.split(':').shift();

4

build/web.js

@@ -23,2 +23,4 @@ "use strict";

getLogger.setLevel = () => {};
getLogger.setLevel = () => {};
getLogger.setLogLevelsConfig = () => {};
{
"name": "@wdio/logger",
"version": "5.6.0",
"version": "5.6.3",
"description": "A helper utility for logging of WebdriverIO packages",

@@ -41,3 +41,3 @@ "author": "Christian Bromann <christian@saucelabs.com>",

},
"gitHead": "00bdd480d34757277d8b9f4f62f504311671a82e"
"gitHead": "63ac0243ab13faf562b5e539ef84e727543dead1"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc