@imqueue/async-logger 1.0.2 → 1.1.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 +23 -23
- package/src/Logger.js +14 -14
- 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.1.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.8.2",
|
15
|
+
"winston-transport": "^4.5.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": "^10.0.
|
23
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
24
|
-
"@typescript-eslint/parser": "^5.
|
25
|
-
"@typescript-eslint/typescript-estree": "^5.
|
26
|
-
"chai": "^4.3.
|
18
|
+
"@types/chai": "^4.3.5",
|
19
|
+
"@types/mocha": "^10.0.1",
|
20
|
+
"@types/mock-require": "^2.0.1",
|
21
|
+
"@types/node": "^20.1.5",
|
22
|
+
"@types/sinon": "^10.0.15",
|
23
|
+
"@typescript-eslint/eslint-plugin": "^5.59.6",
|
24
|
+
"@typescript-eslint/parser": "^5.59.6",
|
25
|
+
"@typescript-eslint/typescript-estree": "^5.59.6",
|
26
|
+
"chai": "^4.3.7",
|
27
27
|
"coveralls": "^3.1.1",
|
28
|
-
"eslint": "^8.
|
29
|
-
"glob": "^
|
30
|
-
"minimist": "^1.2.
|
31
|
-
"mocha": "^
|
28
|
+
"eslint": "^8.40.0",
|
29
|
+
"glob": "^10.2.4",
|
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
36
|
"open": "^8.4.0",
|
37
|
-
"sinon": "^
|
38
|
-
"source-map-support": "^0.5.
|
39
|
-
"ts-node": "^10.
|
40
|
-
"typedoc": "^0.
|
37
|
+
"sinon": "^15.0.4",
|
38
|
+
"source-map-support": "^0.5.21",
|
39
|
+
"ts-node": "^10.9.1",
|
40
|
+
"typedoc": "^0.24.7",
|
41
41
|
"typedoc-plugin-as-member-of": "^1.0.2",
|
42
|
-
"typedoc-plugin-markdown": "^3.
|
43
|
-
"typescript": "^
|
42
|
+
"typedoc-plugin-markdown": "^3.15.3",
|
43
|
+
"typescript": "^5.0.4"
|
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
|
@@ -101,7 +101,6 @@ class Logger {
|
|
101
101
|
}
|
102
102
|
}
|
103
103
|
}
|
104
|
-
exports.Logger = Logger;
|
105
104
|
/**
|
106
105
|
* Asynchronous console async-logger
|
107
106
|
*
|
@@ -113,4 +112,5 @@ Logger.console = {
|
|
113
112
|
warn: (...args) => setTimeout(() => console.log(...args)),
|
114
113
|
error: (...args) => setTimeout(() => console.log(...args)),
|
115
114
|
};
|
115
|
+
exports.Logger = Logger;
|
116
116
|
//# sourceMappingURL=Logger.js.map
|
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];
|