@imqueue/async-logger 1.0.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +5 -1
- package/package.json +24 -24
- package/src/Logger.js +13 -13
- package/src/helpers/index.js +5 -1
- package/src/index.js +5 -1
package/index.js
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
3
|
if (k2 === undefined) k2 = k;
|
4
|
-
Object.
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
5
9
|
}) : (function(o, m, k, k2) {
|
6
10
|
if (k2 === undefined) k2 = k;
|
7
11
|
o[k2] = m[k];
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@imqueue/async-logger",
|
3
|
-
"version": "1.0
|
3
|
+
"version": "1.2.0",
|
4
4
|
"description": "Configurable async logger over winston for @imqueue services",
|
5
5
|
"keywords": [
|
6
6
|
"logger",
|
@@ -10,37 +10,37 @@
|
|
10
10
|
],
|
11
11
|
"main": "index.js",
|
12
12
|
"dependencies": {
|
13
|
-
"@imqueue/core": "^1.
|
14
|
-
"winston": "^3.
|
15
|
-
"winston-transport": "^4.
|
13
|
+
"@imqueue/core": "^1.12.0",
|
14
|
+
"winston": "^3.11.0",
|
15
|
+
"winston-transport": "^4.6.0"
|
16
16
|
},
|
17
17
|
"devDependencies": {
|
18
|
-
"@types/chai": "^4.
|
19
|
-
"@types/mocha": "^
|
20
|
-
"@types/mock-require": "^2.0.
|
21
|
-
"@types/node": "^
|
22
|
-
"@types/sinon": "^
|
23
|
-
"@typescript-eslint/eslint-plugin": "^
|
24
|
-
"@typescript-eslint/parser": "^
|
25
|
-
"@typescript-eslint/typescript-estree": "^
|
26
|
-
"chai": "^4.3.
|
18
|
+
"@types/chai": "^4.3.10",
|
19
|
+
"@types/mocha": "^10.0.4",
|
20
|
+
"@types/mock-require": "^2.0.3",
|
21
|
+
"@types/node": "^20.9.0",
|
22
|
+
"@types/sinon": "^17.0.1",
|
23
|
+
"@typescript-eslint/eslint-plugin": "^6.10.0",
|
24
|
+
"@typescript-eslint/parser": "^6.10.0",
|
25
|
+
"@typescript-eslint/typescript-estree": "^6.10.0",
|
26
|
+
"chai": "^4.3.10",
|
27
27
|
"coveralls": "^3.1.1",
|
28
|
-
"eslint": "^8.
|
29
|
-
"glob": "^
|
30
|
-
"minimist": "^1.2.
|
31
|
-
"mocha": "^
|
28
|
+
"eslint": "^8.53.0",
|
29
|
+
"glob": "^10.3.10",
|
30
|
+
"minimist": "^1.2.8",
|
31
|
+
"mocha": "^10.2.0",
|
32
32
|
"mocha-lcov-reporter": "^1.3.0",
|
33
33
|
"mock-require": "^3.0.3",
|
34
34
|
"npm-scripts-help": "^0.8.0",
|
35
35
|
"nyc": "^15.1.0",
|
36
|
-
"open": "^
|
37
|
-
"sinon": "^
|
38
|
-
"source-map-support": "^0.5.
|
39
|
-
"ts-node": "^10.
|
40
|
-
"typedoc": "^0.
|
36
|
+
"open": "^9.1.0",
|
37
|
+
"sinon": "^17.0.1",
|
38
|
+
"source-map-support": "^0.5.21",
|
39
|
+
"ts-node": "^10.9.1",
|
40
|
+
"typedoc": "^0.25.3",
|
41
41
|
"typedoc-plugin-as-member-of": "^1.0.2",
|
42
|
-
"typedoc-plugin-markdown": "^3.
|
43
|
-
"typescript": "^
|
42
|
+
"typedoc-plugin-markdown": "^3.17.1",
|
43
|
+
"typescript": "^5.2.2"
|
44
44
|
},
|
45
45
|
"scripts": {
|
46
46
|
"prepublishOnly": "npm run build",
|
package/src/Logger.js
CHANGED
@@ -7,6 +7,19 @@ const helpers_1 = require("./helpers");
|
|
7
7
|
* Class Logger
|
8
8
|
*/
|
9
9
|
class Logger {
|
10
|
+
/**
|
11
|
+
* @description
|
12
|
+
* Configuring options of async-logger
|
13
|
+
*
|
14
|
+
* @returns {LoggerOptions}
|
15
|
+
*/
|
16
|
+
static getLoggerOptions(metadata) {
|
17
|
+
return {
|
18
|
+
exitOnError: false,
|
19
|
+
format: winston_1.format.json(),
|
20
|
+
defaultMeta: metadata || (0, helpers_1.defaultMetadata)(),
|
21
|
+
};
|
22
|
+
}
|
10
23
|
/**
|
11
24
|
* Logger Ctor
|
12
25
|
*
|
@@ -21,19 +34,6 @@ class Logger {
|
|
21
34
|
this.setupLogger(config);
|
22
35
|
}
|
23
36
|
}
|
24
|
-
/**
|
25
|
-
* @description
|
26
|
-
* Configuring options of async-logger
|
27
|
-
*
|
28
|
-
* @returns {LoggerOptions}
|
29
|
-
*/
|
30
|
-
static getLoggerOptions(metadata) {
|
31
|
-
return {
|
32
|
-
exitOnError: false,
|
33
|
-
format: winston_1.format.json(),
|
34
|
-
defaultMeta: metadata || (0, helpers_1.defaultMetadata)(),
|
35
|
-
};
|
36
|
-
}
|
37
37
|
/**
|
38
38
|
* Logs given arguments to configured async-logger destinations and to stdout
|
39
39
|
* with log level = LOG
|
package/src/helpers/index.js
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
3
|
if (k2 === undefined) k2 = k;
|
4
|
-
Object.
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
5
9
|
}) : (function(o, m, k, k2) {
|
6
10
|
if (k2 === undefined) k2 = k;
|
7
11
|
o[k2] = m[k];
|
package/src/index.js
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
3
|
if (k2 === undefined) k2 = k;
|
4
|
-
Object.
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
5
9
|
}) : (function(o, m, k, k2) {
|
6
10
|
if (k2 === undefined) k2 = k;
|
7
11
|
o[k2] = m[k];
|