@spinajs/log 2.0.45 → 2.0.48
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/{.eslintrc.js → .eslintrc.cjs} +44 -42
- package/.mocharc.json +8 -0
- package/package.json +54 -50
- package/lib/bootstrap.d.ts +0 -4
- package/lib/bootstrap.js +0 -38
- package/lib/bootstrap.js.map +0 -1
- package/lib/decorators.d.ts +0 -6
- package/lib/decorators.js +0 -39
- package/lib/decorators.js.map +0 -1
- package/lib/index.d.ts +0 -5
- package/lib/index.js +0 -22
- package/lib/index.js.map +0 -1
- package/lib/log.d.ts +0 -49
- package/lib/log.js +0 -194
- package/lib/log.js.map +0 -1
- package/lib/schemas/log.configuration.d.ts +0 -87
- package/lib/schemas/log.configuration.js +0 -92
- package/lib/schemas/log.configuration.js.map +0 -1
- package/lib/targets/BlackHoleTarget.d.ts +0 -7
- package/lib/targets/BlackHoleTarget.js +0 -25
- package/lib/targets/BlackHoleTarget.js.map +0 -1
- package/lib/targets/ColoredConsoleTarget.d.ts +0 -50
- package/lib/targets/ColoredConsoleTarget.js +0 -71
- package/lib/targets/ColoredConsoleTarget.js.map +0 -1
- package/lib/targets/FileTarget.d.ts +0 -29
- package/lib/targets/FileTarget.js +0 -250
- package/lib/targets/FileTarget.js.map +0 -1
- package/lib/targets/index.d.ts +0 -3
- package/lib/targets/index.js +0 -20
- package/lib/targets/index.js.map +0 -1
- package/tsconfig.build.json +0 -9
|
@@ -1,87 +0,0 @@
|
|
|
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,92 +0,0 @@
|
|
|
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: ["trace", "debug", "warn", "info", "error", "fatal", "security", "success"],
|
|
71
|
-
},
|
|
72
|
-
target: {
|
|
73
|
-
oneOf: [
|
|
74
|
-
{
|
|
75
|
-
type: "string",
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
type: "array",
|
|
79
|
-
items: {
|
|
80
|
-
type: "string",
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
],
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
required: ["name", "level", "target"],
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
};
|
|
91
|
-
exports.default = CONFIGURATION_SCHEMA;
|
|
92
|
-
//# sourceMappingURL=log.configuration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log.configuration.js","sourceRoot":"","sources":["../../src/schemas/log.configuration.ts"],"names":[],"mappings":";;AAAA,MAAM,oBAAoB,GAAG;IAC3B,GAAG,EAAE,uCAAuC;IAC5C,oBAAoB,EAAE,QAAQ;IAC9B,WAAW,EAAE,wCAAwC;IACrD,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,OAAO,EAAE;YACP,WAAW,EAAE,wEAAwE;YACrF,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC;YACX,WAAW,EAAE,IAAI;YACjB,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;qBACf;oBACD,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;qBACf;oBACD,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,CAAC;AAEF,kBAAe,oBAAoB,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
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,25 +0,0 @@
|
|
|
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;
|
|
25
|
-
//# sourceMappingURL=BlackHoleTarget.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BlackHoleTarget.js","sourceRoot":"","sources":["../../src/targets/BlackHoleTarget.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAsE;AACtE,oCAAoD;AAGpD;;GAEG;AAGH,IAAa,eAAe,GAA5B,MAAa,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,50 +0,0 @@
|
|
|
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,71 +0,0 @@
|
|
|
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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ColoredConsoleTarget = exports.DEFAULT_THEME = void 0;
|
|
13
|
-
const log_common_1 = require("@spinajs/log-common");
|
|
14
|
-
const di_1 = require("@spinajs/di");
|
|
15
|
-
const __1 = require("..");
|
|
16
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
17
|
-
const configuration_1 = require("@spinajs/configuration");
|
|
18
|
-
exports.DEFAULT_THEME = {
|
|
19
|
-
security: ["red", "bgBrightWhite"],
|
|
20
|
-
fatal: "red",
|
|
21
|
-
error: "brightRed",
|
|
22
|
-
warn: "yellow",
|
|
23
|
-
success: "green",
|
|
24
|
-
info: "white",
|
|
25
|
-
debug: "gray",
|
|
26
|
-
trace: "gray",
|
|
27
|
-
};
|
|
28
|
-
let ColoredConsoleTarget = class ColoredConsoleTarget extends log_common_1.LogTarget {
|
|
29
|
-
constructor() {
|
|
30
|
-
super(...arguments);
|
|
31
|
-
this.theme = [];
|
|
32
|
-
this.StdConsoleCallbackMap = {
|
|
33
|
-
[__1.LogLevel.Error]: console.error,
|
|
34
|
-
[__1.LogLevel.Fatal]: console.error,
|
|
35
|
-
[__1.LogLevel.Security]: console.error,
|
|
36
|
-
[__1.LogLevel.Info]: console.log,
|
|
37
|
-
[__1.LogLevel.Success]: console.log,
|
|
38
|
-
[__1.LogLevel.Trace]: console.debug,
|
|
39
|
-
[__1.LogLevel.Debug]: console.debug,
|
|
40
|
-
[__1.LogLevel.Warn]: console.warn,
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
async resolve() {
|
|
44
|
-
this.theme[__1.LogLevel.Trace] = chalk_1.default.gray;
|
|
45
|
-
this.theme[__1.LogLevel.Debug] = chalk_1.default.gray;
|
|
46
|
-
this.theme[__1.LogLevel.Info] = chalk_1.default.white;
|
|
47
|
-
this.theme[__1.LogLevel.Success] = chalk_1.default.white.bgGreen;
|
|
48
|
-
this.theme[__1.LogLevel.Warn] = chalk_1.default.yellow;
|
|
49
|
-
this.theme[__1.LogLevel.Error] = chalk_1.default.red;
|
|
50
|
-
this.theme[__1.LogLevel.Fatal] = chalk_1.default.white.bgRed;
|
|
51
|
-
this.theme[__1.LogLevel.Security] = chalk_1.default.yellow.bgRed;
|
|
52
|
-
super.resolve();
|
|
53
|
-
}
|
|
54
|
-
async write(data) {
|
|
55
|
-
if (!this.Options.enabled) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
this.StdConsoleCallbackMap[data.Level](
|
|
59
|
-
/**
|
|
60
|
-
* we are safe to call, disable eslint
|
|
61
|
-
*/
|
|
62
|
-
/* eslint-disable */
|
|
63
|
-
this.theme[data.Level]((0, configuration_1.format)(data.Variables, this.Options.layout)));
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
ColoredConsoleTarget = __decorate([
|
|
67
|
-
(0, di_1.Singleton)(),
|
|
68
|
-
(0, di_1.Injectable)("ConsoleTarget")
|
|
69
|
-
], ColoredConsoleTarget);
|
|
70
|
-
exports.ColoredConsoleTarget = ColoredConsoleTarget;
|
|
71
|
-
//# sourceMappingURL=ColoredConsoleTarget.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColoredConsoleTarget.js","sourceRoot":"","sources":["../../src/targets/ColoredConsoleTarget.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAyF;AACzF,oCAAoD;AACpD,0BAA8B;AAC9B,kDAA0B;AAC1B,0DAAgD;AAEnC,QAAA,aAAa,GAAG;IAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC;IAClC,KAAK,EAAE,KAAK;IACZ,KAAK,EAAE,WAAW;IAClB,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,MAAM;CACd,CAAC;AAIF,IAAa,oBAAoB,GAAjC,MAAa,oBAAqB,SAAQ,sBAAuC;IAAjF;;QACY,UAAK,GAAU,EAAE,CAAC;QAElB,0BAAqB,GAAG;YAChC,CAAC,YAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK;YAC/B,CAAC,YAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK;YAC/B,CAAC,YAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,KAAK;YAElC,CAAC,YAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,GAA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K,CAAC;QACpC;;WAEG;QACH,oBAAoB;QACnB,IAAI,CAAC,KAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAA,sBAAM,EAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAC7E,CAAC;IACJ,CAAC;CACF,CAAA;AA3CY,oBAAoB;IAFhC,IAAA,cAAS,GAAE;IACX,IAAA,eAAU,EAAC,eAAe,CAAC;GACf,oBAAoB,CA2ChC;AA3CY,oDAAoB"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import { IInstanceCheck } from "@spinajs/di";
|
|
4
|
-
import { IFileTargetOptions, ILog, ILogEntry, LogTarget } from "@spinajs/log-common";
|
|
5
|
-
import * as fs from "fs";
|
|
6
|
-
import "@spinajs/configuration-common";
|
|
7
|
-
declare enum FileTargetStatus {
|
|
8
|
-
WRITTING = 0,
|
|
9
|
-
PENDING = 1,
|
|
10
|
-
IDLE = 2
|
|
11
|
-
}
|
|
12
|
-
export declare class FileTarget extends LogTarget<IFileTargetOptions> implements IInstanceCheck {
|
|
13
|
-
protected Log: ILog;
|
|
14
|
-
LogDirPath: string;
|
|
15
|
-
ArchiveDirPath: string;
|
|
16
|
-
protected WriteStream: fs.WriteStream;
|
|
17
|
-
protected Buffer: string[];
|
|
18
|
-
protected ArchiveTimer: NodeJS.Timer;
|
|
19
|
-
protected FlushTimer: NodeJS.Timer;
|
|
20
|
-
protected Status: FileTargetStatus;
|
|
21
|
-
protected ArchiveStatus: FileTargetStatus;
|
|
22
|
-
__checkInstance__(creationOptions: IFileTargetOptions): boolean;
|
|
23
|
-
resolve(): void;
|
|
24
|
-
protected flush(): void;
|
|
25
|
-
dispose(): Promise<void>;
|
|
26
|
-
write(data: ILogEntry): Promise<void>;
|
|
27
|
-
protected archive(): void;
|
|
28
|
-
}
|
|
29
|
-
export {};
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
-
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;
|
|
22
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
-
};
|
|
24
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
-
if (mod && mod.__esModule) return mod;
|
|
26
|
-
var result = {};
|
|
27
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
-
__setModuleDefault(result, mod);
|
|
29
|
-
return result;
|
|
30
|
-
};
|
|
31
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
32
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
33
|
-
};
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.FileTarget = void 0;
|
|
36
|
-
/* eslint-disable security/detect-object-injection */
|
|
37
|
-
const os_1 = require("os");
|
|
38
|
-
/* eslint security/detect-non-literal-fs-filename:0 -- Safe as no value holds user input */
|
|
39
|
-
const di_1 = require("@spinajs/di");
|
|
40
|
-
const log_common_1 = require("@spinajs/log-common");
|
|
41
|
-
const fs = __importStar(require("fs"));
|
|
42
|
-
const path = __importStar(require("path"));
|
|
43
|
-
const exceptions_1 = require("@spinajs/exceptions");
|
|
44
|
-
const glob = __importStar(require("glob"));
|
|
45
|
-
const zlib = __importStar(require("zlib"));
|
|
46
|
-
const configuration_1 = require("@spinajs/configuration");
|
|
47
|
-
const stream_1 = require("stream");
|
|
48
|
-
const decorators_1 = require("./../decorators");
|
|
49
|
-
require("@spinajs/configuration-common");
|
|
50
|
-
var FileTargetStatus;
|
|
51
|
-
(function (FileTargetStatus) {
|
|
52
|
-
FileTargetStatus[FileTargetStatus["WRITTING"] = 0] = "WRITTING";
|
|
53
|
-
FileTargetStatus[FileTargetStatus["PENDING"] = 1] = "PENDING";
|
|
54
|
-
FileTargetStatus[FileTargetStatus["IDLE"] = 2] = "IDLE";
|
|
55
|
-
})(FileTargetStatus || (FileTargetStatus = {}));
|
|
56
|
-
// we mark per instance check becouse we can have multiple file targes
|
|
57
|
-
// for different files/paths/logs but we dont want to create every time writer for same.
|
|
58
|
-
let FileTarget = class FileTarget extends log_common_1.LogTarget {
|
|
59
|
-
constructor() {
|
|
60
|
-
super(...arguments);
|
|
61
|
-
this.Buffer = [];
|
|
62
|
-
this.Status = FileTargetStatus.IDLE;
|
|
63
|
-
this.ArchiveStatus = FileTargetStatus.IDLE;
|
|
64
|
-
}
|
|
65
|
-
__checkInstance__(creationOptions) {
|
|
66
|
-
return this.Options.name === creationOptions.name;
|
|
67
|
-
}
|
|
68
|
-
resolve() {
|
|
69
|
-
this.Options.options = Object.assign({
|
|
70
|
-
compress: true,
|
|
71
|
-
maxSize: 1024 * 1024,
|
|
72
|
-
maxArchiveFiles: 5,
|
|
73
|
-
archiveInterval: 3 * 60,
|
|
74
|
-
}, this.Options.options);
|
|
75
|
-
this.LogDirPath = path.dirname(path.resolve((0, configuration_1.format)(null, this.Options.options.path)));
|
|
76
|
-
this.ArchiveDirPath = this.Options.options.archivePath ? path.resolve((0, configuration_1.format)(null, this.Options.options.archivePath)) : this.LogDirPath;
|
|
77
|
-
if (!this.LogDirPath) {
|
|
78
|
-
throw new exceptions_1.InvalidOption("Missing LogDirPath log option");
|
|
79
|
-
}
|
|
80
|
-
if (!fs.existsSync(this.LogDirPath)) {
|
|
81
|
-
fs.mkdirSync(this.LogDirPath);
|
|
82
|
-
}
|
|
83
|
-
if (this.ArchiveDirPath) {
|
|
84
|
-
if (!fs.existsSync(this.ArchiveDirPath)) {
|
|
85
|
-
fs.mkdirSync(this.ArchiveDirPath);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
// flush all buffered messages at least once per second
|
|
89
|
-
// we do this, becouse buffer can not be filled
|
|
90
|
-
// and we could wait unknown amount of time before messages are written to file
|
|
91
|
-
this.FlushTimer = setInterval(() => {
|
|
92
|
-
// do not flush, if we already writting to file
|
|
93
|
-
if (this.Status !== FileTargetStatus.IDLE && this.ArchiveStatus !== FileTargetStatus.IDLE) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
setImmediate(() => {
|
|
97
|
-
this.flush();
|
|
98
|
-
});
|
|
99
|
-
}, 1000);
|
|
100
|
-
// every 3 minutes try to archive log files
|
|
101
|
-
this.ArchiveTimer = setInterval(() => {
|
|
102
|
-
// do not archive if we already doing it
|
|
103
|
-
if (this.Status !== FileTargetStatus.IDLE && this.ArchiveStatus !== FileTargetStatus.IDLE) {
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
this.ArchiveStatus = FileTargetStatus.PENDING;
|
|
107
|
-
// at end of nodejs event loop
|
|
108
|
-
setImmediate(() => {
|
|
109
|
-
this.archive();
|
|
110
|
-
});
|
|
111
|
-
}, this.Options.options.archiveInterval * 1000);
|
|
112
|
-
super.resolve();
|
|
113
|
-
}
|
|
114
|
-
flush() {
|
|
115
|
-
if (this.Buffer.length === 0) {
|
|
116
|
-
this.Status = FileTargetStatus.IDLE;
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
this.Status = FileTargetStatus.WRITTING;
|
|
120
|
-
// we calculate log path every time to allow for
|
|
121
|
-
// dynamic path creation eg. based on timestamp
|
|
122
|
-
const logFileName = (0, configuration_1.format)({ logger: this.Options.name }, path.basename(this.Options.options.path));
|
|
123
|
-
const logPath = path.join(this.LogDirPath, logFileName);
|
|
124
|
-
fs.appendFile(logPath, this.Buffer.join(os_1.EOL) + os_1.EOL, (err) => {
|
|
125
|
-
// log error message to others if applicable eg. console
|
|
126
|
-
if (err) {
|
|
127
|
-
this.Log.error(err, `Cannot write log messages to file target at path ${logPath}`);
|
|
128
|
-
}
|
|
129
|
-
this.Log.trace(`Wrote buffered messages to log file at path ${logPath}, buffer size: ${this.Options.options.maxBufferSize}`);
|
|
130
|
-
this.Buffer = [];
|
|
131
|
-
this.Status = FileTargetStatus.IDLE;
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
async dispose() {
|
|
135
|
-
// stop archiving
|
|
136
|
-
clearInterval(this.ArchiveTimer);
|
|
137
|
-
// stop flush timer
|
|
138
|
-
clearInterval(this.FlushTimer);
|
|
139
|
-
// write all messages from buffer
|
|
140
|
-
this.flush();
|
|
141
|
-
}
|
|
142
|
-
async write(data) {
|
|
143
|
-
if (!this.Options.enabled) {
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
const lEntry = (0, configuration_1.format)(data.Variables, this.Options.layout);
|
|
147
|
-
this.Buffer.push(lEntry);
|
|
148
|
-
// if we already writting, skip buffer check & write to file
|
|
149
|
-
// wait until write is finished
|
|
150
|
-
if (this.Status !== FileTargetStatus.IDLE || this.ArchiveStatus !== FileTargetStatus.IDLE) {
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
if (this.Buffer.length >= this.Options.options.maxBufferSize) {
|
|
154
|
-
this.Status = FileTargetStatus.PENDING;
|
|
155
|
-
// write at end of nodejs event loop all buffered messages at once
|
|
156
|
-
setImmediate(() => {
|
|
157
|
-
this.flush();
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
archive() {
|
|
162
|
-
const { ext } = path.parse(path.basename(this.Options.options.path));
|
|
163
|
-
const aFiles = glob
|
|
164
|
-
.sync(path.join(this.ArchiveDirPath, `archived_*{${ext},.gzip}`))
|
|
165
|
-
.map((f) => {
|
|
166
|
-
return {
|
|
167
|
-
name: f,
|
|
168
|
-
stat: fs.statSync(f),
|
|
169
|
-
};
|
|
170
|
-
})
|
|
171
|
-
.sort((a, b) => a.stat.mtime.getTime() - b.stat.mtime.getTime());
|
|
172
|
-
const lFiles = glob
|
|
173
|
-
.sync(path.join(this.LogDirPath, `*${ext}`))
|
|
174
|
-
.map((f) => {
|
|
175
|
-
return {
|
|
176
|
-
name: f,
|
|
177
|
-
stat: fs.statSync(f),
|
|
178
|
-
};
|
|
179
|
-
})
|
|
180
|
-
.sort((a, b) => a.stat.mtime.getTime() - b.stat.mtime.getTime());
|
|
181
|
-
// clear archived files above limit
|
|
182
|
-
if (aFiles.length > this.Options.options.maxArchiveFiles) {
|
|
183
|
-
for (let i = 0; i < aFiles.length - this.Options.options.maxArchiveFiles; i++) {
|
|
184
|
-
fs.unlink(aFiles[i].name, (err) => {
|
|
185
|
-
if (err) {
|
|
186
|
-
this.Log.error(err, `Cannot delete archived file at path ${aFiles[i - 1].name}`);
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
this.Log.info(`Deleted archived file at path ${aFiles[i].name}`);
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
// now move log files that are above limited file size or old
|
|
195
|
-
const filesToArchive = lFiles.filter((x) => {
|
|
196
|
-
return x.stat.size > this.Options.options.maxSize || lFiles.indexOf(x) <= lFiles.length - 2;
|
|
197
|
-
});
|
|
198
|
-
if (filesToArchive.length === 0) {
|
|
199
|
-
this.ArchiveStatus = FileTargetStatus.IDLE;
|
|
200
|
-
}
|
|
201
|
-
for (let i = 0; i < filesToArchive.length; i++) {
|
|
202
|
-
const { name, ext } = path.parse(path.basename(lFiles[i].name));
|
|
203
|
-
// get number of files with same name, eg. during a day, multiple log files can be produced
|
|
204
|
-
const lArchiFiles = glob.sync(path.join(this.ArchiveDirPath, `archived_${name}*{${ext},.gzip}`));
|
|
205
|
-
const archPath = path.join(this.ArchiveDirPath, `archived_${name}_${lArchiFiles.length + 1}${ext}`);
|
|
206
|
-
fs.rename(lFiles[i].name, archPath, (err) => {
|
|
207
|
-
if (err) {
|
|
208
|
-
this.Log.error(err, `Cannot move log file ${name} to archive at path ${archPath}`);
|
|
209
|
-
return;
|
|
210
|
-
}
|
|
211
|
-
if (this.Options.options.compress) {
|
|
212
|
-
this.Log.trace(`Compressing archive log at path ${archPath}`);
|
|
213
|
-
const zippedPath = path.join(this.ArchiveDirPath, `archived_${name}_${lArchiFiles.length + 1}${ext}.gzip`);
|
|
214
|
-
const zip = zlib.createGzip();
|
|
215
|
-
const read = fs.createReadStream(archPath);
|
|
216
|
-
const write = fs.createWriteStream(zippedPath);
|
|
217
|
-
(0, stream_1.pipeline)(read, zip, write, (err) => {
|
|
218
|
-
if (err) {
|
|
219
|
-
this.Log.error(err, `Cannot compress archived file at path ${archPath}`);
|
|
220
|
-
fs.unlink(zippedPath, () => {
|
|
221
|
-
return;
|
|
222
|
-
});
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
this.Log.info(`Succesyfully compressed archive log at path ${zippedPath}`);
|
|
226
|
-
fs.unlink(archPath, (err) => {
|
|
227
|
-
if (err) {
|
|
228
|
-
this.Log.error(err, `Cannot delete archived log after compression at path ${archPath}`);
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
this.ArchiveStatus = FileTargetStatus.IDLE;
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
else {
|
|
235
|
-
this.ArchiveStatus = FileTargetStatus.IDLE;
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
};
|
|
241
|
-
__decorate([
|
|
242
|
-
(0, decorators_1.Logger)("LogFileTarget"),
|
|
243
|
-
__metadata("design:type", Object)
|
|
244
|
-
], FileTarget.prototype, "Log", void 0);
|
|
245
|
-
FileTarget = __decorate([
|
|
246
|
-
(0, di_1.PerInstanceCheck)(),
|
|
247
|
-
(0, di_1.Injectable)("FileTarget")
|
|
248
|
-
], FileTarget);
|
|
249
|
-
exports.FileTarget = FileTarget;
|
|
250
|
-
//# sourceMappingURL=FileTarget.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileTarget.js","sourceRoot":"","sources":["../../src/targets/FileTarget.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAqD;AACrD,2BAAyB;AACzB,2FAA2F;AAC3F,oCAA2E;AAC3E,oDAAqF;AACrF,uCAAyB;AACzB,2CAA6B;AAC7B,oDAAoD;AACpD,2CAA6B;AAC7B,2CAA6B;AAC7B,0DAAgD;AAChD,mCAAkC;AAClC,gDAAyC;AAEzC,yCAAuC;AAEvC,IAAK,gBAIJ;AAJD,WAAK,gBAAgB;IACnB,+DAAQ,CAAA;IACR,6DAAO,CAAA;IACP,uDAAI,CAAA;AACN,CAAC,EAJI,gBAAgB,KAAhB,gBAAgB,QAIpB;AAED,sEAAsE;AACtE,wFAAwF;AAGxF,IAAa,UAAU,GAAvB,MAAa,UAAW,SAAQ,sBAA6B;IAA7D;;QA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