@spinajs/log 2.0.180 → 2.0.182

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.
Files changed (45) hide show
  1. package/lib/cjs/bootstrap.d.ts +4 -4
  2. package/lib/cjs/bootstrap.js +55 -55
  3. package/lib/cjs/bootstrap.js.map +1 -1
  4. package/lib/cjs/index.d.ts +4 -4
  5. package/lib/cjs/index.js +20 -20
  6. package/lib/cjs/log.d.ts +29 -29
  7. package/lib/cjs/log.js +161 -161
  8. package/lib/cjs/log.js.map +1 -1
  9. package/lib/cjs/schemas/log.configuration.d.ts +87 -87
  10. package/lib/cjs/schemas/log.configuration.js +100 -100
  11. package/lib/cjs/targets/BlackHoleTarget.d.ts +7 -7
  12. package/lib/cjs/targets/BlackHoleTarget.js +24 -24
  13. package/lib/cjs/targets/BlackHoleTarget.js.map +1 -1
  14. package/lib/cjs/targets/ColoredConsoleTarget.d.ts +50 -50
  15. package/lib/cjs/targets/ColoredConsoleTarget.js +70 -70
  16. package/lib/cjs/targets/ColoredConsoleTarget.js.map +1 -1
  17. package/lib/cjs/targets/FileTarget.d.ts +29 -29
  18. package/lib/cjs/targets/FileTarget.js +263 -263
  19. package/lib/cjs/targets/FileTarget.js.map +1 -1
  20. package/lib/cjs/targets/index.d.ts +3 -3
  21. package/lib/cjs/targets/index.js +19 -19
  22. package/lib/mjs/bootstrap.d.ts +4 -4
  23. package/lib/mjs/bootstrap.js +49 -49
  24. package/lib/mjs/bootstrap.js.map +1 -1
  25. package/lib/mjs/index.d.ts +4 -4
  26. package/lib/mjs/index.js +4 -4
  27. package/lib/mjs/log.d.ts +29 -29
  28. package/lib/mjs/log.js +155 -155
  29. package/lib/mjs/log.js.map +1 -1
  30. package/lib/mjs/schemas/log.configuration.d.ts +87 -87
  31. package/lib/mjs/schemas/log.configuration.js +98 -98
  32. package/lib/mjs/targets/BlackHoleTarget.d.ts +7 -7
  33. package/lib/mjs/targets/BlackHoleTarget.js +21 -21
  34. package/lib/mjs/targets/BlackHoleTarget.js.map +1 -1
  35. package/lib/mjs/targets/ColoredConsoleTarget.d.ts +50 -50
  36. package/lib/mjs/targets/ColoredConsoleTarget.js +64 -64
  37. package/lib/mjs/targets/ColoredConsoleTarget.js.map +1 -1
  38. package/lib/mjs/targets/FileTarget.d.ts +29 -29
  39. package/lib/mjs/targets/FileTarget.js +234 -234
  40. package/lib/mjs/targets/FileTarget.js.map +1 -1
  41. package/lib/mjs/targets/index.d.ts +3 -3
  42. package/lib/mjs/targets/index.js +3 -3
  43. package/lib/tsconfig.cjs.tsbuildinfo +1 -1
  44. package/lib/tsconfig.mjs.tsbuildinfo +1 -1
  45. package/package.json +6 -6
@@ -1,88 +1,88 @@
1
- declare const CONFIGURATION_SCHEMA: {
2
- $id: string;
3
- $configurationModule: string;
4
- description: string;
5
- type: string;
6
- properties: {
7
- targets: {
8
- description: string;
9
- type: string;
10
- minItems: number;
11
- uniqueItems: boolean;
12
- items: {
13
- type: string;
14
- properties: {
15
- layout: {
16
- type: string;
17
- };
18
- name: {
19
- type: string;
20
- };
21
- type: {
22
- type: string;
23
- };
24
- enabled: {
25
- type: string;
26
- };
27
- path: {
28
- type: string;
29
- };
30
- archivePath: {
31
- type: string;
32
- };
33
- maxSize: {
34
- type: string;
35
- minimum: number;
36
- };
37
- compress: {
38
- type: string;
39
- };
40
- rotate: {
41
- type: string;
42
- };
43
- maxArchiveFiles: {
44
- type: string;
45
- minimum: number;
46
- };
47
- bufferSize: {
48
- type: string;
49
- minimum: number;
50
- };
51
- };
52
- required: string[];
53
- };
54
- };
55
- rules: {
56
- description: string;
57
- type: string;
58
- minItems: number;
59
- uniqueItems: boolean;
60
- items: {
61
- type: string;
62
- properties: {
63
- name: {
64
- type: string;
65
- };
66
- level: {
67
- type: string;
68
- enum: string[];
69
- };
70
- target: {
71
- oneOf: ({
72
- type: string;
73
- items?: undefined;
74
- } | {
75
- type: string;
76
- items: {
77
- type: string;
78
- };
79
- })[];
80
- };
81
- };
82
- required: string[];
83
- };
84
- };
85
- };
86
- };
87
- export default CONFIGURATION_SCHEMA;
1
+ declare const CONFIGURATION_SCHEMA: {
2
+ $id: string;
3
+ $configurationModule: string;
4
+ description: string;
5
+ type: string;
6
+ properties: {
7
+ targets: {
8
+ description: string;
9
+ type: string;
10
+ minItems: number;
11
+ uniqueItems: boolean;
12
+ items: {
13
+ type: string;
14
+ properties: {
15
+ layout: {
16
+ type: string;
17
+ };
18
+ name: {
19
+ type: string;
20
+ };
21
+ type: {
22
+ type: string;
23
+ };
24
+ enabled: {
25
+ type: string;
26
+ };
27
+ path: {
28
+ type: string;
29
+ };
30
+ archivePath: {
31
+ type: string;
32
+ };
33
+ maxSize: {
34
+ type: string;
35
+ minimum: number;
36
+ };
37
+ compress: {
38
+ type: string;
39
+ };
40
+ rotate: {
41
+ type: string;
42
+ };
43
+ maxArchiveFiles: {
44
+ type: string;
45
+ minimum: number;
46
+ };
47
+ bufferSize: {
48
+ type: string;
49
+ minimum: number;
50
+ };
51
+ };
52
+ required: string[];
53
+ };
54
+ };
55
+ rules: {
56
+ description: string;
57
+ type: string;
58
+ minItems: number;
59
+ uniqueItems: boolean;
60
+ items: {
61
+ type: string;
62
+ properties: {
63
+ name: {
64
+ type: string;
65
+ };
66
+ level: {
67
+ type: string;
68
+ enum: string[];
69
+ };
70
+ target: {
71
+ oneOf: ({
72
+ type: string;
73
+ items?: undefined;
74
+ } | {
75
+ type: string;
76
+ items: {
77
+ type: string;
78
+ };
79
+ })[];
80
+ };
81
+ };
82
+ required: string[];
83
+ };
84
+ };
85
+ };
86
+ };
87
+ export default CONFIGURATION_SCHEMA;
88
88
  //# sourceMappingURL=log.configuration.d.ts.map
@@ -1,101 +1,101 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const CONFIGURATION_SCHEMA = {
4
- $id: "spinajs/log.configuration.schema.json",
5
- $configurationModule: "logger",
6
- description: "Logger configuration option validation",
7
- type: "object",
8
- properties: {
9
- targets: {
10
- description: "Log target, where log messages should be written to, and their options",
11
- type: "array",
12
- minItems: 1,
13
- uniqueItems: true,
14
- items: {
15
- type: "object",
16
- properties: {
17
- layout: {
18
- type: "string",
19
- },
20
- name: {
21
- type: "string",
22
- },
23
- type: {
24
- type: "string",
25
- },
26
- enabled: {
27
- type: "boolean",
28
- },
29
- path: {
30
- type: "string",
31
- },
32
- archivePath: {
33
- type: "string",
34
- },
35
- maxSize: {
36
- type: "integer",
37
- minimum: 10000,
38
- },
39
- compress: {
40
- type: "boolean",
41
- },
42
- rotate: {
43
- type: "string",
44
- },
45
- maxArchiveFiles: {
46
- type: "integer",
47
- minimum: 1,
48
- },
49
- bufferSize: {
50
- type: "integer",
51
- minimum: 1000,
52
- },
53
- },
54
- required: ["name", "type"],
55
- },
56
- },
57
- rules: {
58
- description: "Log rules, what log should be write where",
59
- type: "array",
60
- minItems: 1,
61
- uniqueItems: true,
62
- items: {
63
- type: "object",
64
- properties: {
65
- name: {
66
- type: "string",
67
- },
68
- level: {
69
- type: "string",
70
- enum: [
71
- "trace",
72
- "debug",
73
- "warn",
74
- "info",
75
- "error",
76
- "fatal",
77
- "security",
78
- "success",
79
- ],
80
- },
81
- target: {
82
- oneOf: [
83
- {
84
- type: "string",
85
- },
86
- {
87
- type: "array",
88
- items: {
89
- type: "string",
90
- },
91
- },
92
- ],
93
- },
94
- },
95
- required: ["name", "level", "target"],
96
- },
97
- },
98
- },
99
- };
100
- exports.default = CONFIGURATION_SCHEMA;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const CONFIGURATION_SCHEMA = {
4
+ $id: "spinajs/log.configuration.schema.json",
5
+ $configurationModule: "logger",
6
+ description: "Logger configuration option validation",
7
+ type: "object",
8
+ properties: {
9
+ targets: {
10
+ description: "Log target, where log messages should be written to, and their options",
11
+ type: "array",
12
+ minItems: 1,
13
+ uniqueItems: true,
14
+ items: {
15
+ type: "object",
16
+ properties: {
17
+ layout: {
18
+ type: "string",
19
+ },
20
+ name: {
21
+ type: "string",
22
+ },
23
+ type: {
24
+ type: "string",
25
+ },
26
+ enabled: {
27
+ type: "boolean",
28
+ },
29
+ path: {
30
+ type: "string",
31
+ },
32
+ archivePath: {
33
+ type: "string",
34
+ },
35
+ maxSize: {
36
+ type: "integer",
37
+ minimum: 10000,
38
+ },
39
+ compress: {
40
+ type: "boolean",
41
+ },
42
+ rotate: {
43
+ type: "string",
44
+ },
45
+ maxArchiveFiles: {
46
+ type: "integer",
47
+ minimum: 1,
48
+ },
49
+ bufferSize: {
50
+ type: "integer",
51
+ minimum: 1000,
52
+ },
53
+ },
54
+ required: ["name", "type"],
55
+ },
56
+ },
57
+ rules: {
58
+ description: "Log rules, what log should be write where",
59
+ type: "array",
60
+ minItems: 1,
61
+ uniqueItems: true,
62
+ items: {
63
+ type: "object",
64
+ properties: {
65
+ name: {
66
+ type: "string",
67
+ },
68
+ level: {
69
+ type: "string",
70
+ enum: [
71
+ "trace",
72
+ "debug",
73
+ "warn",
74
+ "info",
75
+ "error",
76
+ "fatal",
77
+ "security",
78
+ "success",
79
+ ],
80
+ },
81
+ target: {
82
+ oneOf: [
83
+ {
84
+ type: "string",
85
+ },
86
+ {
87
+ type: "array",
88
+ items: {
89
+ type: "string",
90
+ },
91
+ },
92
+ ],
93
+ },
94
+ },
95
+ required: ["name", "level", "target"],
96
+ },
97
+ },
98
+ },
99
+ };
100
+ exports.default = CONFIGURATION_SCHEMA;
101
101
  //# sourceMappingURL=log.configuration.js.map
@@ -1,8 +1,8 @@
1
- import { ICommonTargetOptions, LogTarget } from "@spinajs/log-common";
2
- /**
3
- * Empty writer, usefull for tests or when we dont want to get any messages
4
- */
5
- export declare class BlackHoleTarget extends LogTarget<ICommonTargetOptions> {
6
- write(): Promise<void>;
7
- }
1
+ import { ICommonTargetOptions, LogTarget } from "@spinajs/log-common";
2
+ /**
3
+ * Empty writer, usefull for tests or when we dont want to get any messages
4
+ */
5
+ export declare class BlackHoleTarget extends LogTarget<ICommonTargetOptions> {
6
+ write(): Promise<void>;
7
+ }
8
8
  //# sourceMappingURL=BlackHoleTarget.d.ts.map
@@ -1,25 +1,25 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.BlackHoleTarget = void 0;
10
- const log_common_1 = require("@spinajs/log-common");
11
- const di_1 = require("@spinajs/di");
12
- /**
13
- * Empty writer, usefull for tests or when we dont want to get any messages
14
- */
15
- let BlackHoleTarget = class BlackHoleTarget extends log_common_1.LogTarget {
16
- async write() {
17
- return;
18
- }
19
- };
20
- BlackHoleTarget = __decorate([
21
- (0, di_1.Singleton)(),
22
- (0, di_1.Injectable)("BlackHoleTarget")
23
- ], BlackHoleTarget);
24
- exports.BlackHoleTarget = BlackHoleTarget;
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.BlackHoleTarget = void 0;
10
+ const log_common_1 = require("@spinajs/log-common");
11
+ const di_1 = require("@spinajs/di");
12
+ /**
13
+ * Empty writer, usefull for tests or when we dont want to get any messages
14
+ */
15
+ let BlackHoleTarget = class BlackHoleTarget extends log_common_1.LogTarget {
16
+ async write() {
17
+ return;
18
+ }
19
+ };
20
+ exports.BlackHoleTarget = BlackHoleTarget;
21
+ exports.BlackHoleTarget = BlackHoleTarget = __decorate([
22
+ (0, di_1.Singleton)(),
23
+ (0, di_1.Injectable)("BlackHoleTarget")
24
+ ], BlackHoleTarget);
25
25
  //# sourceMappingURL=BlackHoleTarget.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BlackHoleTarget.js","sourceRoot":"","sources":["../../../src/targets/BlackHoleTarget.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAsE;AACtE,oCAAoD;AAEpD;;GAEG;AAGI,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,sBAA+B;IAC3D,KAAK,CAAC,KAAK;QAChB,OAAO;IACT,CAAC;CACF,CAAA;AAJY,eAAe;IAF3B,IAAA,cAAS,GAAE;IACX,IAAA,eAAU,EAAC,iBAAiB,CAAC;GACjB,eAAe,CAI3B;AAJY,0CAAe"}
1
+ {"version":3,"file":"BlackHoleTarget.js","sourceRoot":"","sources":["../../../src/targets/BlackHoleTarget.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAsE;AACtE,oCAAoD;AAEpD;;GAEG;AAGI,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,sBAA+B;IAC3D,KAAK,CAAC,KAAK;QAChB,OAAO;IACT,CAAC;CACF,CAAA;AAJY,0CAAe;0BAAf,eAAe;IAF3B,IAAA,cAAS,GAAE;IACX,IAAA,eAAU,EAAC,iBAAiB,CAAC;GACjB,eAAe,CAI3B"}
@@ -1,51 +1,51 @@
1
- import { IColoredConsoleTargetOptions, ILogEntry, LogTarget } from "@spinajs/log-common";
2
- export declare const DEFAULT_THEME: {
3
- security: string[];
4
- fatal: string;
5
- error: string;
6
- warn: string;
7
- success: string;
8
- info: string;
9
- debug: string;
10
- trace: string;
11
- };
12
- export declare class ColoredConsoleTarget extends LogTarget<IColoredConsoleTargetOptions> {
13
- protected theme: any[];
14
- protected StdConsoleCallbackMap: {
15
- 5: {
16
- (...data: any[]): void;
17
- (message?: any, ...optionalParams: any[]): void;
18
- };
19
- 6: {
20
- (...data: any[]): void;
21
- (message?: any, ...optionalParams: any[]): void;
22
- };
23
- 999: {
24
- (...data: any[]): void;
25
- (message?: any, ...optionalParams: any[]): void;
26
- };
27
- 2: {
28
- (...data: any[]): void;
29
- (message?: any, ...optionalParams: any[]): void;
30
- };
31
- 3: {
32
- (...data: any[]): void;
33
- (message?: any, ...optionalParams: any[]): void;
34
- };
35
- 0: {
36
- (...data: any[]): void;
37
- (message?: any, ...optionalParams: any[]): void;
38
- };
39
- 1: {
40
- (...data: any[]): void;
41
- (message?: any, ...optionalParams: any[]): void;
42
- };
43
- 4: {
44
- (...data: any[]): void;
45
- (message?: any, ...optionalParams: any[]): void;
46
- };
47
- };
48
- resolve(): Promise<void>;
49
- write(data: ILogEntry): Promise<void>;
50
- }
1
+ import { IColoredConsoleTargetOptions, ILogEntry, LogTarget } from "@spinajs/log-common";
2
+ export declare const DEFAULT_THEME: {
3
+ security: string[];
4
+ fatal: string;
5
+ error: string;
6
+ warn: string;
7
+ success: string;
8
+ info: string;
9
+ debug: string;
10
+ trace: string;
11
+ };
12
+ export declare class ColoredConsoleTarget extends LogTarget<IColoredConsoleTargetOptions> {
13
+ protected theme: any[];
14
+ protected StdConsoleCallbackMap: {
15
+ 5: {
16
+ (...data: any[]): void;
17
+ (message?: any, ...optionalParams: any[]): void;
18
+ };
19
+ 6: {
20
+ (...data: any[]): void;
21
+ (message?: any, ...optionalParams: any[]): void;
22
+ };
23
+ 999: {
24
+ (...data: any[]): void;
25
+ (message?: any, ...optionalParams: any[]): void;
26
+ };
27
+ 2: {
28
+ (...data: any[]): void;
29
+ (message?: any, ...optionalParams: any[]): void;
30
+ };
31
+ 3: {
32
+ (...data: any[]): void;
33
+ (message?: any, ...optionalParams: any[]): void;
34
+ };
35
+ 0: {
36
+ (...data: any[]): void;
37
+ (message?: any, ...optionalParams: any[]): void;
38
+ };
39
+ 1: {
40
+ (...data: any[]): void;
41
+ (message?: any, ...optionalParams: any[]): void;
42
+ };
43
+ 4: {
44
+ (...data: any[]): void;
45
+ (message?: any, ...optionalParams: any[]): void;
46
+ };
47
+ };
48
+ resolve(): Promise<void>;
49
+ write(data: ILogEntry): Promise<void>;
50
+ }
51
51
  //# sourceMappingURL=ColoredConsoleTarget.d.ts.map