Comparing version 1.5.2 to 1.6.0
@@ -20,2 +20,3 @@ declare namespace Logger { | ||
id: number | ||
meta: any | ||
name: string | ||
@@ -71,3 +72,3 @@ type: Logger.Type | ||
constructor(name: string) | ||
constructor(name: string, meta?: any) | ||
@@ -74,0 +75,0 @@ extend(namespace: string): Logger |
@@ -32,2 +32,1 @@ "use strict"; | ||
module.exports = import_shared.default; | ||
//# sourceMappingURL=node.js.map |
@@ -96,4 +96,5 @@ "use strict"; | ||
var _Logger = class _Logger { | ||
constructor(name) { | ||
constructor(name, meta) { | ||
this.name = name; | ||
this.meta = meta; | ||
if (name in _Logger.instances) | ||
@@ -172,3 +173,3 @@ return _Logger.instances[name]; | ||
const content = this.format(target, ...args); | ||
const record = { id, type, level, name: this.name, content, timestamp }; | ||
const record = { id, type, level, name: this.name, meta: this.meta, content, timestamp }; | ||
if (target.record) { | ||
@@ -271,2 +272,1 @@ target.record(record); | ||
module.exports = Logger; | ||
//# sourceMappingURL=shared.js.map |
{ | ||
"name": "reggol", | ||
"description": "Logger for professionals", | ||
"version": "1.5.2", | ||
"version": "1.6.0", | ||
"sideEffects": false, | ||
@@ -22,2 +22,3 @@ "main": "lib/node.js", | ||
"lib", | ||
"src", | ||
"index.d.ts" | ||
@@ -36,4 +37,4 @@ ], | ||
"scripts": { | ||
"build:node": "esbuild src/node.ts --outfile=lib/node.cjs --bundle --sourcemap --platform=node --external:cosmokit --external:supports-color --target=es2019", | ||
"build:browser": "esbuild src/browser.ts --outfile=lib/browser.mjs --bundle --sourcemap --platform=browser --external:cosmokit --external:supports-color --target=esnext", | ||
"build:node": "esbuild src/node.ts --outfile=lib/node.cjs --bundle --sourcemap --sources-content=false --platform=node --external:cosmokit --external:supports-color --target=es2019", | ||
"build:browser": "esbuild src/browser.ts --outfile=lib/browser.mjs --bundle --sourcemap --sources-content=false --platform=browser --external:cosmokit --external:supports-color --target=esnext", | ||
"build": "yarn build:node && yarn build:browser && yarn tsc -b", | ||
@@ -63,5 +64,5 @@ "test": "mocha -r esbuild-register tests/*.spec.ts", | ||
"supports-color": "^8.1.1", | ||
"cosmokit": "^1.4.5", | ||
"cosmokit": "^1.5.1", | ||
"object-inspect": "^1.12.3" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
64681
17
879
Updatedcosmokit@^1.5.1