@wdio/logger
Advanced tools
Comparing version 5.16.5 to 5.16.10
@@ -50,3 +50,5 @@ "use strict"; | ||
}]; | ||
const loggers = {}; | ||
const loggers = _loglevel.default.getLoggers(); | ||
let logLevelsConfig = {}; | ||
@@ -57,3 +59,3 @@ const logCache = new Set(); | ||
_loglevel.default.methodFactory = function (methodName, logLevel, loggerName) { | ||
const wdioLoggerMethodFactory = function (methodName, logLevel, loggerName) { | ||
const rawMethod = originalFactory(methodName, logLevel, loggerName); | ||
@@ -97,9 +99,2 @@ return (...args) => { | ||
_loglevelPluginPrefix.default.apply(_loglevel.default, { | ||
template: '%t %l %n:', | ||
timestampFormatter: date => _chalk.default.gray(date.toISOString()), | ||
levelFormatter: level => _chalk.default[COLORS[level]](level.toUpperCase()), | ||
nameFormatter: name => _chalk.default.whiteBright(name) | ||
}); | ||
function getLogger(name) { | ||
@@ -119,2 +114,11 @@ if (loggers[name]) { | ||
loggers[name].setLevel(logLevel); | ||
loggers[name].methodFactory = wdioLoggerMethodFactory; | ||
_loglevelPluginPrefix.default.apply(loggers[name], { | ||
template: '%t %l %n:', | ||
timestampFormatter: date => _chalk.default.gray(date.toISOString()), | ||
levelFormatter: level => _chalk.default[COLORS[level]](level.toUpperCase()), | ||
nameFormatter: name => _chalk.default.whiteBright(name) | ||
}); | ||
return loggers[name]; | ||
@@ -121,0 +125,0 @@ } |
{ | ||
"name": "@wdio/logger", | ||
"version": "5.16.5", | ||
"version": "5.16.10", | ||
"description": "A helper utility for logging of WebdriverIO packages", | ||
@@ -41,3 +41,3 @@ "author": "Christian Bromann <christian@saucelabs.com>", | ||
}, | ||
"gitHead": "e30649c9151aebc034a935db1e8399149ddf6078" | ||
"gitHead": "e4745ca3e9f615d4e0df7ec4e2b38114ddd51e9d" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
7042
146
0