loglevelnext
Advanced tools
Comparing version 1.0.0 to 1.0.1
10
index.js
@@ -32,3 +32,7 @@ 'use strict'; | ||
const { name } = options; | ||
if (!options.id) { | ||
options.id = options.name; | ||
} | ||
const { name, id } = options; | ||
const defaults = { level: defaultLogger.level }; | ||
@@ -40,6 +44,6 @@ | ||
let logger = cache[name]; | ||
let logger = cache[id]; | ||
if (!logger) { | ||
logger = new LogLevel(Object.assign({}, defaults, options)); | ||
cache[name] = logger; | ||
cache[id] = logger; | ||
} | ||
@@ -46,0 +50,0 @@ return logger; |
{ | ||
"name": "loglevelnext", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A modern logging library for Node.js and modern browsers that provides log level mapping to the console", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -100,2 +100,7 @@ | ||
_Note: the logger returned is cached, and subsequent requests for a logger of | ||
the same name will return the same logger instance. If you require multiple | ||
unique loggers of the same name, pass an `id` property with a unique identifier | ||
and `getLogger` will use that over the `name`._ | ||
#### `noConflict()` | ||
@@ -102,0 +107,0 @@ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
42334
402
208
0