@spinajs/log 1.1.7 → 1.2.8
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/.eslintignore +2 -0
- package/.eslintrc.js +43 -0
- package/lib/bootstrap.d.ts +4 -0
- package/lib/bootstrap.js +30 -0
- package/lib/bootstrap.js.map +1 -0
- package/lib/config/log.js +3 -3
- package/lib/config/log.js.map +1 -1
- package/lib/decorators.d.ts +3 -3
- package/lib/decorators.js +4 -4
- package/lib/decorators.js.map +1 -1
- package/lib/index.d.ts +7 -2
- package/lib/index.js +8 -2
- package/lib/index.js.map +1 -1
- package/lib/log.d.ts +8 -32
- package/lib/log.js +59 -123
- package/lib/log.js.map +1 -1
- package/lib/logger.d.ts +3 -7
- package/lib/logger.js +14 -24
- package/lib/logger.js.map +1 -1
- package/lib/schemas/log.configuration.d.ts +1 -0
- package/lib/schemas/log.configuration.js +91 -97
- package/lib/schemas/log.configuration.js.map +1 -1
- package/lib/targets/BlackHoleTarget.d.ts +3 -3
- package/lib/targets/BlackHoleTarget.js.map +1 -1
- package/lib/targets/ColoredConsoleTarget.d.ts +4 -5
- package/lib/targets/ColoredConsoleTarget.js +18 -14
- package/lib/targets/ColoredConsoleTarget.js.map +1 -1
- package/lib/targets/FileTarget.d.ts +3 -4
- package/lib/targets/FileTarget.js +84 -112
- package/lib/targets/FileTarget.js.map +1 -1
- package/lib/targets/LogTarget.d.ts +10 -5
- package/lib/targets/LogTarget.js +38 -36
- package/lib/targets/LogTarget.js.map +1 -1
- package/lib/targets/index.d.ts +1 -0
- package/lib/targets/index.js +1 -0
- package/lib/targets/index.js.map +1 -1
- package/lib/types.d.ts +13 -10
- package/lib/types.js +8 -8
- package/lib/types.js.map +1 -1
- package/lib/variables/date.d.ts +1 -1
- package/lib/variables/date.js +7 -7
- package/lib/variables/date.js.map +1 -1
- package/lib/variables/env.d.ts +1 -1
- package/lib/variables/env.js +4 -4
- package/lib/variables/env.js.map +1 -1
- package/lib/variables/process.d.ts +2 -3
- package/lib/variables/process.js +4 -16
- package/lib/variables/process.js.map +1 -1
- package/package.json +14 -39
- package/tsconfig.build.json +9 -0
package/lib/variables/env.js
CHANGED
|
@@ -8,18 +8,18 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.EnvVariable = void 0;
|
|
10
10
|
const di_1 = require("@spinajs/di");
|
|
11
|
-
const
|
|
12
|
-
let EnvVariable = class EnvVariable extends
|
|
11
|
+
const log_common_1 = require("@spinajs/log-common");
|
|
12
|
+
let EnvVariable = class EnvVariable extends log_common_1.LogVariable {
|
|
13
13
|
get Name() {
|
|
14
14
|
return "env";
|
|
15
15
|
}
|
|
16
16
|
Value(option) {
|
|
17
17
|
var _a;
|
|
18
|
-
return (_a = process.env[option]) !== null && _a !== void 0 ? _a : "";
|
|
18
|
+
return (_a = process.env[`${option}`]) !== null && _a !== void 0 ? _a : "";
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
EnvVariable = __decorate([
|
|
22
|
-
(0, di_1.Injectable)(
|
|
22
|
+
(0, di_1.Injectable)(log_common_1.LogVariable)
|
|
23
23
|
], EnvVariable);
|
|
24
24
|
exports.EnvVariable = EnvVariable;
|
|
25
25
|
//# sourceMappingURL=env.js.map
|
package/lib/variables/env.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/variables/env.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oCAAyC;AACzC,
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/variables/env.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oCAAyC;AACzC,oDAAkD;AAGlD,IAAa,WAAW,GAAxB,MAAa,WAAY,SAAQ,wBAAW;IAC1C,IAAW,IAAI;QACb,OAAO,KAAK,CAAC;IACf,CAAC;IACM,KAAK,CAAC,MAAc;;QACzB,OAAO,MAAA,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,EAAE,CAAC,mCAAI,EAAE,CAAC;IACxC,CAAC;CACF,CAAA;AAPY,WAAW;IADvB,IAAA,eAAU,EAAC,wBAAW,CAAC;GACX,WAAW,CAOvB;AAPY,kCAAW"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { LogVariable } from "
|
|
1
|
+
import { LogVariable } from "@spinajs/log-common";
|
|
2
2
|
export declare class ProcVariable extends LogVariable {
|
|
3
|
-
protected ALLOWED_PROPS: string[];
|
|
4
3
|
get Name(): string;
|
|
5
|
-
Value(option:
|
|
4
|
+
Value(option: "title" | "version" | "pid" | "platform"): string;
|
|
6
5
|
}
|
package/lib/variables/process.js
CHANGED
|
@@ -8,29 +8,17 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.ProcVariable = void 0;
|
|
10
10
|
const di_1 = require("@spinajs/di");
|
|
11
|
-
const
|
|
12
|
-
let ProcVariable = class ProcVariable extends
|
|
13
|
-
constructor() {
|
|
14
|
-
super(...arguments);
|
|
15
|
-
this.ALLOWED_PROPS = [
|
|
16
|
-
"title",
|
|
17
|
-
"version",
|
|
18
|
-
"pid",
|
|
19
|
-
"platform",
|
|
20
|
-
];
|
|
21
|
-
}
|
|
11
|
+
const log_common_1 = require("@spinajs/log-common");
|
|
12
|
+
let ProcVariable = class ProcVariable extends log_common_1.LogVariable {
|
|
22
13
|
get Name() {
|
|
23
14
|
return "proc";
|
|
24
15
|
}
|
|
25
16
|
Value(option) {
|
|
26
|
-
|
|
27
|
-
return process[option];
|
|
28
|
-
}
|
|
29
|
-
return `[${option} is undefined]`;
|
|
17
|
+
return process[`${option}`];
|
|
30
18
|
}
|
|
31
19
|
};
|
|
32
20
|
ProcVariable = __decorate([
|
|
33
|
-
(0, di_1.Injectable)(
|
|
21
|
+
(0, di_1.Injectable)(log_common_1.LogVariable)
|
|
34
22
|
], ProcVariable);
|
|
35
23
|
exports.ProcVariable = ProcVariable;
|
|
36
24
|
//# sourceMappingURL=process.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.js","sourceRoot":"","sources":["../../src/variables/process.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oCAAyC;AACzC,
|
|
1
|
+
{"version":3,"file":"process.js","sourceRoot":"","sources":["../../src/variables/process.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oCAAyC;AACzC,oDAAkD;AAGlD,IAAa,YAAY,GAAzB,MAAa,YAAa,SAAQ,wBAAW;IAC3C,IAAW,IAAI;QACb,OAAO,MAAM,CAAC;IAChB,CAAC;IACM,KAAK,CAAC,MAAgD;QAC3D,OAAO,OAAO,CAAC,GAAG,MAAM,EAAE,CAAW,CAAC;IACxC,CAAC;CACF,CAAA;AAPY,YAAY;IADxB,IAAA,eAAU,EAAC,wBAAW,CAAC;GACX,YAAY,CAOxB;AAPY,oCAAY"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spinajs/log",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.8",
|
|
4
4
|
"description": "Log lib for all spinejs related libs",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
"test": "ts-mocha -p tsconfig.json test/**/*.test.ts",
|
|
9
9
|
"coverage": "nyc npm run test",
|
|
10
10
|
"build-docs": "rimraf docs && typedoc --options typedoc.json src/",
|
|
11
|
-
"build": "
|
|
12
|
-
"
|
|
11
|
+
"build": "npm run clean && npm run compile",
|
|
12
|
+
"compile": "tsc -p tsconfig.build.json",
|
|
13
|
+
"clean": "",
|
|
13
14
|
"prepare": "npm run build",
|
|
14
|
-
"format": "prettier --write \"src/**/*.ts\"
|
|
15
|
-
"lint": "
|
|
15
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
16
|
+
"lint": "eslint -c .eslintrc.js --ext .ts src",
|
|
16
17
|
"prepublishOnly": "npm test && npm run lint",
|
|
17
18
|
"preversion": "npm run lint",
|
|
18
19
|
"version": "npm run format && git add -A src",
|
|
@@ -25,10 +26,11 @@
|
|
|
25
26
|
},
|
|
26
27
|
"homepage": "https://github.com/spinajs/log#readme",
|
|
27
28
|
"dependencies": {
|
|
28
|
-
"@spinajs/configuration": "^1.
|
|
29
|
-
"@spinajs/di": "^1.
|
|
30
|
-
"@spinajs/exceptions": "^1.
|
|
31
|
-
"@spinajs/
|
|
29
|
+
"@spinajs/configuration": "^1.2.7",
|
|
30
|
+
"@spinajs/di": "^1.2.7",
|
|
31
|
+
"@spinajs/exceptions": "^1.2.7",
|
|
32
|
+
"@spinajs/log-common": "^1.2.7",
|
|
33
|
+
"ajv": "^8.8.2",
|
|
32
34
|
"colors": "^1.4.0",
|
|
33
35
|
"glob": "^7.2.0",
|
|
34
36
|
"glob-to-regexp": "^0.4.1",
|
|
@@ -37,34 +39,7 @@
|
|
|
37
39
|
"node-schedule": "^2.1.0"
|
|
38
40
|
},
|
|
39
41
|
"devDependencies": {
|
|
40
|
-
"@types/
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"@types/chai-subset": "^1.3.3",
|
|
44
|
-
"@types/colors": "^1.2.1",
|
|
45
|
-
"@types/glob": "^7.2.0",
|
|
46
|
-
"@types/glob-to-regexp": "^0.4.1",
|
|
47
|
-
"@types/lodash": "^4.14.136",
|
|
48
|
-
"@types/luxon": "^2.0.8",
|
|
49
|
-
"@types/mocha": "^5.2.7",
|
|
50
|
-
"@types/node": "^17.0.8",
|
|
51
|
-
"@types/node-schedule": "^1.3.2",
|
|
52
|
-
"@types/sinon": "^10.0.6",
|
|
53
|
-
"chai": "^4.2.0",
|
|
54
|
-
"chai-as-promised": "^7.1.1",
|
|
55
|
-
"chai-subset": "^1.6.0",
|
|
56
|
-
"mocha": "^6.1.4",
|
|
57
|
-
"nyc": "^14.1.1",
|
|
58
|
-
"prettier": "^1.18.2",
|
|
59
|
-
"sinon": "^12.0.1",
|
|
60
|
-
"ts-mocha": "^6.0.0",
|
|
61
|
-
"ts-node": "^8.3.0",
|
|
62
|
-
"tslint": "^5.20.1",
|
|
63
|
-
"tslint-circular-dependencies": "^0.1.0",
|
|
64
|
-
"tslint-config-prettier": "^1.18.0",
|
|
65
|
-
"tslint-config-standard": "^8.0.1",
|
|
66
|
-
"tslint-no-unused-expression-chai": "^0.1.4",
|
|
67
|
-
"typedoc": "^0.14.2",
|
|
68
|
-
"typescript": "^4.2.3"
|
|
69
|
-
}
|
|
42
|
+
"@types/color": "^3.0.3"
|
|
43
|
+
},
|
|
44
|
+
"gitHead": "4775754b5957d77f76d6ebcbdb947f8940ed167d"
|
|
70
45
|
}
|