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