@celljs/logger 3.6.7 → 3.6.9
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/logger",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.9",
|
|
4
4
|
"description": "logger component for pino",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cell-component"
|
|
@@ -30,16 +30,15 @@
|
|
|
30
30
|
"watch": "cell-component watch"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@celljs/core": "3.6.
|
|
34
|
-
"@celljs/web": "3.6.7",
|
|
33
|
+
"@celljs/core": "3.6.9",
|
|
35
34
|
"tslib": "^2.8.0",
|
|
36
35
|
"winston": "^3.10.0"
|
|
37
36
|
},
|
|
38
37
|
"devDependencies": {
|
|
39
|
-
"@celljs/component": "3.6.
|
|
38
|
+
"@celljs/component": "3.6.9"
|
|
40
39
|
},
|
|
41
40
|
"publishConfig": {
|
|
42
41
|
"access": "public"
|
|
43
42
|
},
|
|
44
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "62c715e3361ca3a464ddc7642c9b3c23ceb47f29"
|
|
45
44
|
}
|
|
@@ -2,6 +2,8 @@ import { Logger, LOGGER_CONFIG, Value, Component, Autowired, Optional, AbstractL
|
|
|
2
2
|
import { WinstonConfig, RawWinstonLogger } from './winston-logger-protocol';
|
|
3
3
|
import { createLogger, transports, format } from 'winston';
|
|
4
4
|
|
|
5
|
+
let _logger: RawWinstonLogger;
|
|
6
|
+
|
|
5
7
|
@Component({ id: Logger, rebind: true, scope: Scope.Transient })
|
|
6
8
|
export class WinstonLogger extends AbstractLogger {
|
|
7
9
|
|
|
@@ -19,7 +21,11 @@ export class WinstonLogger extends AbstractLogger {
|
|
|
19
21
|
@PostConstruct()
|
|
20
22
|
protected init() {
|
|
21
23
|
if (!this.logger) {
|
|
22
|
-
|
|
24
|
+
if (_logger) {
|
|
25
|
+
this.logger = _logger;
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
_logger = createLogger({
|
|
23
29
|
level: this.level,
|
|
24
30
|
format: format.combine(
|
|
25
31
|
format.timestamp(),
|