@imqueue/async-logger 2.0.0 → 2.0.2
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/README.md +7 -7
- package/package.json +14 -14
- package/src/Logger.js +3 -3
package/README.md
CHANGED
|
@@ -14,20 +14,20 @@ There are two actual ways of using async logger.
|
|
|
14
14
|
|
|
15
15
|
1. Rely on singleton instance produced by this library, which is configured by
|
|
16
16
|
environment variables (see Configuration section below)
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
In this case as simple as
|
|
19
19
|
~~~typescript
|
|
20
|
-
import logger from '@imqueue/async-
|
|
21
|
-
|
|
20
|
+
import logger from '@imqueue/async-logger';
|
|
21
|
+
|
|
22
22
|
serviceOptions.logger = logger;
|
|
23
23
|
~~~
|
|
24
24
|
|
|
25
25
|
2. Instantiate and configure async logger programmatically:
|
|
26
26
|
~~~typescript
|
|
27
|
-
import { Logger } from '@imqueue/async-
|
|
28
|
-
|
|
27
|
+
import { Logger } from '@imqueue/async-logger';
|
|
28
|
+
|
|
29
29
|
const { name, version } = require('./package.json');
|
|
30
|
-
|
|
30
|
+
|
|
31
31
|
const logger = new Logger({
|
|
32
32
|
transports: [{
|
|
33
33
|
type: 'http',
|
|
@@ -48,7 +48,7 @@ There are two actual ways of using async logger.
|
|
|
48
48
|
hostname: 'localhost'
|
|
49
49
|
},
|
|
50
50
|
});
|
|
51
|
-
|
|
51
|
+
|
|
52
52
|
serviceOptions.logger = logger;
|
|
53
53
|
~~~
|
|
54
54
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imqueue/async-logger",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Configurable async logger over winston for @imqueue services",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"logger",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
],
|
|
11
11
|
"main": "index.js",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@imqueue/core": "^2.0.
|
|
13
|
+
"@imqueue/core": "^2.0.11",
|
|
14
14
|
"winston": "^3.17.0",
|
|
15
15
|
"winston-transport": "^4.9.0"
|
|
16
16
|
},
|
|
@@ -18,29 +18,29 @@
|
|
|
18
18
|
"@types/chai": "^5.2.2",
|
|
19
19
|
"@types/mocha": "^10.0.10",
|
|
20
20
|
"@types/mock-require": "^3.0.0",
|
|
21
|
-
"@types/node": "^24.
|
|
21
|
+
"@types/node": "^24.3.1",
|
|
22
22
|
"@types/sinon": "^17.0.4",
|
|
23
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
24
|
-
"@typescript-eslint/parser": "^8.
|
|
25
|
-
"@typescript-eslint/typescript-estree": "^8.
|
|
26
|
-
"chai": "^
|
|
27
|
-
"coveralls-next": "^
|
|
28
|
-
"eslint": "^9.
|
|
23
|
+
"@typescript-eslint/eslint-plugin": "^8.42.0",
|
|
24
|
+
"@typescript-eslint/parser": "^8.42.0",
|
|
25
|
+
"@typescript-eslint/typescript-estree": "^8.42.0",
|
|
26
|
+
"chai": "^6.0.1",
|
|
27
|
+
"coveralls-next": "^5.0.0",
|
|
28
|
+
"eslint": "^9.34.0",
|
|
29
29
|
"glob": "^11.0.3",
|
|
30
30
|
"minimist": "^1.2.8",
|
|
31
|
-
"mocha": "^11.7.
|
|
31
|
+
"mocha": "^11.7.2",
|
|
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": "^17.1.0",
|
|
36
|
-
"open": "^10.
|
|
36
|
+
"open": "^10.2.0",
|
|
37
37
|
"sinon": "^21.0.0",
|
|
38
38
|
"source-map-support": "^0.5.21",
|
|
39
39
|
"ts-node": "^10.9.2",
|
|
40
|
-
"typedoc": "^0.28.
|
|
40
|
+
"typedoc": "^0.28.12",
|
|
41
41
|
"typedoc-plugin-as-member-of": "^1.0.2",
|
|
42
|
-
"typedoc-plugin-markdown": "^4.
|
|
43
|
-
"typescript": "^5.
|
|
42
|
+
"typedoc-plugin-markdown": "^4.8.1",
|
|
43
|
+
"typescript": "^5.9.2"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"prepublishOnly": "npm run build",
|
package/src/Logger.js
CHANGED
|
@@ -109,8 +109,8 @@ exports.Logger = Logger;
|
|
|
109
109
|
*/
|
|
110
110
|
Logger.console = {
|
|
111
111
|
log: (...args) => setTimeout(() => console.log(...args)),
|
|
112
|
-
info: (...args) => setTimeout(() => console.
|
|
113
|
-
warn: (...args) => setTimeout(() => console.
|
|
114
|
-
error: (...args) => setTimeout(() => console.
|
|
112
|
+
info: (...args) => setTimeout(() => console.info(...args)),
|
|
113
|
+
warn: (...args) => setTimeout(() => console.warn(...args)),
|
|
114
|
+
error: (...args) => setTimeout(() => console.error(...args)),
|
|
115
115
|
};
|
|
116
116
|
//# sourceMappingURL=Logger.js.map
|