namirasoft-log 1.3.5 → 1.3.7
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/.ns-sdkg-dir-deep +1 -0
- package/.ns-sdkg-dir-keep +0 -0
- package/.ns-sdkg-file-keep +12 -0
- package/dist/FormatterFull.d.ts +2 -2
- package/dist/FormatterFull.js +9 -20
- package/dist/FormatterFull.js.map +1 -1
- package/dist/FormatterShort.d.ts +2 -2
- package/dist/FormatterShort.js +3 -14
- package/dist/FormatterShort.js.map +1 -1
- package/dist/IFormatter.d.ts +2 -2
- package/dist/ILogger.d.ts +13 -13
- package/dist/IStream.d.ts +1 -1
- package/dist/Logger.d.ts +13 -13
- package/dist/Logger.js +21 -58
- package/dist/Logger.js.map +1 -1
- package/dist/NamirasoftLogServer.d.ts +9 -0
- package/dist/NamirasoftLogServer.js +10 -0
- package/dist/NamirasoftLogServer.js.map +1 -1
- package/dist/NamirasoftLogServerBase.d.ts +5 -0
- package/dist/NamirasoftLogServerBase.js +12 -0
- package/dist/NamirasoftLogServerBase.js.map +1 -0
- package/dist/NamirasoftLogServerHealthz.d.ts +4 -0
- package/dist/NamirasoftLogServerHealthz.js +25 -0
- package/dist/NamirasoftLogServerHealthz.js.map +1 -0
- package/dist/NamirasoftLogServerLog.d.ts +8 -0
- package/dist/NamirasoftLogServerLog.js +39 -0
- package/dist/NamirasoftLogServerLog.js.map +1 -0
- package/dist/NamirasoftLogServerLogGroup.d.ts +10 -0
- package/dist/NamirasoftLogServerLogGroup.js +53 -0
- package/dist/NamirasoftLogServerLogGroup.js.map +1 -0
- package/dist/StreamConsole.d.ts +1 -1
- package/dist/StreamConsole.js +25 -36
- package/dist/StreamConsole.js.map +1 -1
- package/dist/StreamFile.d.ts +1 -1
- package/dist/StreamFile.js +2 -13
- package/dist/StreamFile.js.map +1 -1
- package/dist/StreamNamirasoftLog.d.ts +1 -1
- package/dist/StreamNamirasoftLog.js +0 -11
- package/dist/StreamNamirasoftLog.js.map +1 -1
- package/dist/command/HealthzCommand.d.ts +4 -0
- package/dist/command/HealthzCommand.js +15 -0
- package/dist/command/HealthzCommand.js.map +1 -0
- package/dist/command/HealthzGetCommand.d.ts +5 -0
- package/dist/command/HealthzGetCommand.js +37 -0
- package/dist/command/HealthzGetCommand.js.map +1 -0
- package/dist/command/LogCommand.d.ts +4 -0
- package/dist/command/LogCommand.js +19 -0
- package/dist/command/LogCommand.js.map +1 -0
- package/dist/command/LogCreateCommand.d.ts +5 -0
- package/dist/command/LogCreateCommand.js +129 -0
- package/dist/command/LogCreateCommand.js.map +1 -0
- package/dist/command/LogGetAllCommand.d.ts +5 -0
- package/dist/command/LogGetAllCommand.js +37 -0
- package/dist/command/LogGetAllCommand.js.map +1 -0
- package/dist/command/LogGetCommand.d.ts +5 -0
- package/dist/command/LogGetCommand.js +37 -0
- package/dist/command/LogGetCommand.js.map +1 -0
- package/dist/command/LogGroupCommand.d.ts +4 -0
- package/dist/command/LogGroupCommand.js +23 -0
- package/dist/command/LogGroupCommand.js.map +1 -0
- package/dist/command/LogGroupCreateCommand.d.ts +5 -0
- package/dist/command/LogGroupCreateCommand.js +57 -0
- package/dist/command/LogGroupCreateCommand.js.map +1 -0
- package/dist/command/LogGroupDeleteCommand.d.ts +5 -0
- package/dist/command/LogGroupDeleteCommand.js +37 -0
- package/dist/command/LogGroupDeleteCommand.js.map +1 -0
- package/dist/command/LogGroupGetAllCommand.d.ts +5 -0
- package/dist/command/LogGroupGetAllCommand.js +37 -0
- package/dist/command/LogGroupGetAllCommand.js.map +1 -0
- package/dist/command/LogGroupGetCommand.d.ts +5 -0
- package/dist/command/LogGroupGetCommand.js +37 -0
- package/dist/command/LogGroupGetCommand.js.map +1 -0
- package/dist/command/LogGroupUpdateCommand.d.ts +5 -0
- package/dist/command/LogGroupUpdateCommand.js +57 -0
- package/dist/command/LogGroupUpdateCommand.js.map +1 -0
- package/dist/command/cli.d.ts +2 -0
- package/dist/command/cli.js +16 -0
- package/dist/command/cli.js.map +1 -0
- package/dist/index.d.ts +23 -1
- package/dist/index.js +23 -1
- package/dist/index.js.map +1 -1
- package/dist/row/LogRow.d.ts +3 -0
- package/dist/row/LogRow.js +3 -0
- package/dist/row/LogRow.js.map +1 -0
- package/dist/row/LogRowInput.d.ts +12 -0
- package/dist/row/LogRowInput.js +3 -0
- package/dist/row/LogRowInput.js.map +1 -0
- package/dist/row/LogRowOutput.d.ts +1 -0
- package/dist/row/LogRowOutput.js +3 -0
- package/dist/row/LogRowOutput.js.map +1 -0
- package/dist/row/LoggroupRow.d.ts +3 -0
- package/dist/row/LoggroupRow.js +3 -0
- package/dist/row/LoggroupRow.js.map +1 -0
- package/dist/row/LoggroupRowInput.d.ts +4 -0
- package/dist/row/LoggroupRowInput.js +3 -0
- package/dist/row/LoggroupRowInput.js.map +1 -0
- package/dist/row/LoggroupRowOutput.d.ts +4 -0
- package/dist/row/LoggroupRowOutput.js +3 -0
- package/dist/row/LoggroupRowOutput.js.map +1 -0
- package/package.json +10 -6
- package/src/FormatterFull.ts +1 -1
- package/src/FormatterShort.ts +1 -1
- package/src/IFormatter.ts +1 -1
- package/src/ILogger.ts +13 -13
- package/src/IStream.ts +1 -1
- package/src/Logger.ts +27 -30
- package/src/NamirasoftLogServer.ts +39 -2
- package/src/NamirasoftLogServerBase.ts +31 -0
- package/src/NamirasoftLogServerHealthz.ts +32 -0
- package/src/NamirasoftLogServerLog.ts +46 -0
- package/src/NamirasoftLogServerLogGroup.ts +58 -0
- package/src/StreamConsole.ts +1 -1
- package/src/StreamFile.ts +1 -1
- package/src/StreamNamirasoftLog.ts +1 -1
- package/src/command/HealthzCommand.ts +33 -0
- package/src/command/HealthzGetCommand.ts +45 -0
- package/src/command/LogCommand.ts +37 -0
- package/src/command/LogCreateCommand.ts +137 -0
- package/src/command/LogGetAllCommand.ts +45 -0
- package/src/command/LogGetCommand.ts +45 -0
- package/src/command/LogGroupCommand.ts +41 -0
- package/src/command/LogGroupCreateCommand.ts +65 -0
- package/src/command/LogGroupDeleteCommand.ts +45 -0
- package/src/command/LogGroupGetAllCommand.ts +45 -0
- package/src/command/LogGroupGetCommand.ts +45 -0
- package/src/command/LogGroupUpdateCommand.ts +65 -0
- package/src/command/cli.ts +35 -0
- package/src/index.ts +45 -2
- package/src/row/LogRow.ts +25 -0
- package/src/row/LogRowInput.ts +34 -0
- package/src/row/LogRowOutput.ts +24 -0
- package/src/row/LoggroupRow.ts +25 -0
- package/src/row/LoggroupRowInput.ts +26 -0
- package/src/row/LoggroupRowOutput.ts +26 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LogGroupDeleteCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftLogServer_1 = require("../NamirasoftLogServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class LogGroupDeleteCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["id"], []);
|
|
20
|
+
}
|
|
21
|
+
exec() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
let token = this.app.storage.getNSAToken();
|
|
24
|
+
if (token == null)
|
|
25
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
26
|
+
let storage = new namirasoft_core_1.IStorageMemory();
|
|
27
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
28
|
+
manager.setValue(token, false);
|
|
29
|
+
let server = new NamirasoftLogServer_1.NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
30
|
+
let ans = yield server.loggroup.Delete(this.arg_values[0]);
|
|
31
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.LogGroupDeleteCommand = LogGroupDeleteCommand;
|
|
36
|
+
;
|
|
37
|
+
//# sourceMappingURL=LogGroupDeleteCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogGroupDeleteCommand.js","sourceRoot":"","sources":["../../src/command/LogGroupDeleteCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,6DAAuD;AACvD,qDAAiD;AACjD,gEAA6D;AAC7D,2DAAkD;AAElD,MAAa,qBAAsB,SAAQ,sCAAgB;IAEvD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5B,CAAC;IACc,IAAI;;YAEf,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,KAAK,IAAI,IAAI;gBACb,MAAM,IAAI,KAAK,CAAC,+GAA+G,CAAC,CAAC;YACrI,IAAI,OAAO,GAAG,IAAI,gCAAc,EAAE,CAAC;YACnC,IAAI,OAAO,GAAG,IAAI,iCAAY,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;YACnD,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/B,IAAI,MAAM,GAAG,IAAI,yCAAmB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACrF,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3D,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAlBD,sDAkBC;AAAA,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LogGroupGetAllCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftLogServer_1 = require("../NamirasoftLogServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class LogGroupGetAllCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["project_id", "search"], []);
|
|
20
|
+
}
|
|
21
|
+
exec() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
let token = this.app.storage.getNSAToken();
|
|
24
|
+
if (token == null)
|
|
25
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
26
|
+
let storage = new namirasoft_core_1.IStorageMemory();
|
|
27
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
28
|
+
manager.setValue(token, false);
|
|
29
|
+
let server = new NamirasoftLogServer_1.NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
30
|
+
let ans = yield server.loggroup.GetAll(this.arg_values[0], this.arg_values[1]);
|
|
31
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.LogGroupGetAllCommand = LogGroupGetAllCommand;
|
|
36
|
+
;
|
|
37
|
+
//# sourceMappingURL=LogGroupGetAllCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogGroupGetAllCommand.js","sourceRoot":"","sources":["../../src/command/LogGroupGetAllCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,6DAAuD;AACvD,qDAAiD;AACjD,gEAA6D;AAC7D,2DAAkD;AAElD,MAAa,qBAAsB,SAAQ,sCAAgB;IAEvD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;IAC9C,CAAC;IACc,IAAI;;YAEf,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,KAAK,IAAI,IAAI;gBACb,MAAM,IAAI,KAAK,CAAC,+GAA+G,CAAC,CAAC;YACrI,IAAI,OAAO,GAAG,IAAI,gCAAc,EAAE,CAAC;YACnC,IAAI,OAAO,GAAG,IAAI,iCAAY,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;YACnD,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/B,IAAI,MAAM,GAAG,IAAI,yCAAmB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACrF,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YAC/E,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAlBD,sDAkBC;AAAA,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LogGroupGetCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftLogServer_1 = require("../NamirasoftLogServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class LogGroupGetCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["id"], []);
|
|
20
|
+
}
|
|
21
|
+
exec() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
let token = this.app.storage.getNSAToken();
|
|
24
|
+
if (token == null)
|
|
25
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
26
|
+
let storage = new namirasoft_core_1.IStorageMemory();
|
|
27
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
28
|
+
manager.setValue(token, false);
|
|
29
|
+
let server = new NamirasoftLogServer_1.NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
30
|
+
let ans = yield server.loggroup.Get(this.arg_values[0]);
|
|
31
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.LogGroupGetCommand = LogGroupGetCommand;
|
|
36
|
+
;
|
|
37
|
+
//# sourceMappingURL=LogGroupGetCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogGroupGetCommand.js","sourceRoot":"","sources":["../../src/command/LogGroupGetCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,6DAAuD;AACvD,qDAAiD;AACjD,gEAA6D;AAC7D,2DAAkD;AAElD,MAAa,kBAAmB,SAAQ,sCAAgB;IAEpD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5B,CAAC;IACc,IAAI;;YAEf,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,KAAK,IAAI,IAAI;gBACb,MAAM,IAAI,KAAK,CAAC,+GAA+G,CAAC,CAAC;YACrI,IAAI,OAAO,GAAG,IAAI,gCAAc,EAAE,CAAC;YACnC,IAAI,OAAO,GAAG,IAAI,iCAAY,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;YACnD,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/B,IAAI,MAAM,GAAG,IAAI,yCAAmB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACrF,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACxD,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAlBD,gDAkBC;AAAA,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LogGroupUpdateCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftLogServer_1 = require("../NamirasoftLogServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class LogGroupUpdateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["id"], [
|
|
20
|
+
{
|
|
21
|
+
name: "project_id",
|
|
22
|
+
short: "",
|
|
23
|
+
description: "Provides the value of 'project_id' in body",
|
|
24
|
+
optional: false,
|
|
25
|
+
args: ["project_id"],
|
|
26
|
+
defaults: [""]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "name",
|
|
30
|
+
short: "",
|
|
31
|
+
description: "Provides the value of 'name' in body",
|
|
32
|
+
optional: false,
|
|
33
|
+
args: ["name"],
|
|
34
|
+
defaults: [""]
|
|
35
|
+
}
|
|
36
|
+
]);
|
|
37
|
+
}
|
|
38
|
+
exec() {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
let token = this.app.storage.getNSAToken();
|
|
41
|
+
if (token == null)
|
|
42
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
43
|
+
let storage = new namirasoft_core_1.IStorageMemory();
|
|
44
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
45
|
+
manager.setValue(token, false);
|
|
46
|
+
let server = new NamirasoftLogServer_1.NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
47
|
+
let ans = yield server.loggroup.Update(this.arg_values[0], {
|
|
48
|
+
project_id: this.option_values.project_id,
|
|
49
|
+
name: this.option_values.name
|
|
50
|
+
});
|
|
51
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.LogGroupUpdateCommand = LogGroupUpdateCommand;
|
|
56
|
+
;
|
|
57
|
+
//# sourceMappingURL=LogGroupUpdateCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogGroupUpdateCommand.js","sourceRoot":"","sources":["../../src/command/LogGroupUpdateCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,6DAAuD;AACvD,qDAAiD;AACjD,gEAA6D;AAC7D,2DAAkD;AAElD,MAAa,qBAAsB,SAAQ,sCAAgB;IAEvD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE;YAChB;gBACI,IAAI,EAAE,YAAY;gBAClB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,4CAA4C;gBACzD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,YAAY,CAAC;gBACpB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,sCAAsC;gBACnD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,MAAM,CAAC;gBACd,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;SACA,CAAC,CAAC;IACX,CAAC;IACc,IAAI;;YAEf,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,KAAK,IAAI,IAAI;gBACb,MAAM,IAAI,KAAK,CAAC,+GAA+G,CAAC,CAAC;YACrI,IAAI,OAAO,GAAG,IAAI,gCAAc,EAAE,CAAC;YACnC,IAAI,OAAO,GAAG,IAAI,iCAAY,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;YACnD,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/B,IAAI,MAAM,GAAG,IAAI,yCAAmB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACrF,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;gBACvD,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,UAAU;gBACzC,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI;aAChC,CAAC,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAtCD,sDAsCC;AAAA,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
5
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
6
|
+
const HealthzCommand_1 = require("./HealthzCommand");
|
|
7
|
+
const LogCommand_1 = require("./LogCommand");
|
|
8
|
+
const LogGroupCommand_1 = require("./LogGroupCommand");
|
|
9
|
+
let app = new namirasoft_node_cli_1.Application("ns-log", new namirasoft_node_cli_1.BaseStorage(), {
|
|
10
|
+
"healthz": HealthzCommand_1.HealthzCommand,
|
|
11
|
+
"log": LogCommand_1.LogCommand,
|
|
12
|
+
"loggroup": LogGroupCommand_1.LogGroupCommand,
|
|
13
|
+
"account": namirasoft_account_1.AccountCommand
|
|
14
|
+
});
|
|
15
|
+
app.run();
|
|
16
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/command/cli.ts"],"names":[],"mappings":";;;AAqBA,2DAAoD;AACpD,6DAA+D;AAC/D,qDAAkD;AAClD,6CAA0C;AAC1C,uDAAoD;AAEpD,IAAI,GAAG,GAAG,IAAI,iCAAW,CAAC,QAAQ,EAAE,IAAI,iCAAW,EAAE,EACjD;IACI,SAAS,EAAE,+BAAc;IACzB,KAAK,EAAE,uBAAU;IACjB,UAAU,EAAE,iCAAe;IAC3B,SAAS,EAAE,mCAAc;CAC5B,CAAC,CAAC;AACP,GAAG,CAAC,GAAG,EAAE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,9 +5,31 @@ export * from "./IFormatter";
|
|
|
5
5
|
export * from "./ILogger";
|
|
6
6
|
export * from "./IStream";
|
|
7
7
|
export * from "./Log";
|
|
8
|
-
export * from "./Logger";
|
|
9
8
|
export * from "./LogLevel";
|
|
9
|
+
export * from "./Logger";
|
|
10
10
|
export * from "./NamirasoftLogServer";
|
|
11
|
+
export * from "./NamirasoftLogServerBase";
|
|
12
|
+
export * from "./NamirasoftLogServerHealthz";
|
|
13
|
+
export * from "./NamirasoftLogServerLog";
|
|
14
|
+
export * from "./NamirasoftLogServerLogGroup";
|
|
11
15
|
export * from "./StreamConsole";
|
|
12
16
|
export * from "./StreamFile";
|
|
13
17
|
export * from "./StreamNamirasoftLog";
|
|
18
|
+
export * from "./command/HealthzCommand";
|
|
19
|
+
export * from "./command/HealthzGetCommand";
|
|
20
|
+
export * from "./command/LogCommand";
|
|
21
|
+
export * from "./command/LogCreateCommand";
|
|
22
|
+
export * from "./command/LogGetAllCommand";
|
|
23
|
+
export * from "./command/LogGetCommand";
|
|
24
|
+
export * from "./command/LogGroupCommand";
|
|
25
|
+
export * from "./command/LogGroupCreateCommand";
|
|
26
|
+
export * from "./command/LogGroupDeleteCommand";
|
|
27
|
+
export * from "./command/LogGroupGetAllCommand";
|
|
28
|
+
export * from "./command/LogGroupGetCommand";
|
|
29
|
+
export * from "./command/LogGroupUpdateCommand";
|
|
30
|
+
export * from "./row/LogRow";
|
|
31
|
+
export * from "./row/LogRowInput";
|
|
32
|
+
export * from "./row/LogRowOutput";
|
|
33
|
+
export * from "./row/LoggroupRow";
|
|
34
|
+
export * from "./row/LoggroupRowInput";
|
|
35
|
+
export * from "./row/LoggroupRowOutput";
|
package/dist/index.js
CHANGED
|
@@ -21,10 +21,32 @@ __exportStar(require("./IFormatter"), exports);
|
|
|
21
21
|
__exportStar(require("./ILogger"), exports);
|
|
22
22
|
__exportStar(require("./IStream"), exports);
|
|
23
23
|
__exportStar(require("./Log"), exports);
|
|
24
|
-
__exportStar(require("./Logger"), exports);
|
|
25
24
|
__exportStar(require("./LogLevel"), exports);
|
|
25
|
+
__exportStar(require("./Logger"), exports);
|
|
26
26
|
__exportStar(require("./NamirasoftLogServer"), exports);
|
|
27
|
+
__exportStar(require("./NamirasoftLogServerBase"), exports);
|
|
28
|
+
__exportStar(require("./NamirasoftLogServerHealthz"), exports);
|
|
29
|
+
__exportStar(require("./NamirasoftLogServerLog"), exports);
|
|
30
|
+
__exportStar(require("./NamirasoftLogServerLogGroup"), exports);
|
|
27
31
|
__exportStar(require("./StreamConsole"), exports);
|
|
28
32
|
__exportStar(require("./StreamFile"), exports);
|
|
29
33
|
__exportStar(require("./StreamNamirasoftLog"), exports);
|
|
34
|
+
__exportStar(require("./command/HealthzCommand"), exports);
|
|
35
|
+
__exportStar(require("./command/HealthzGetCommand"), exports);
|
|
36
|
+
__exportStar(require("./command/LogCommand"), exports);
|
|
37
|
+
__exportStar(require("./command/LogCreateCommand"), exports);
|
|
38
|
+
__exportStar(require("./command/LogGetAllCommand"), exports);
|
|
39
|
+
__exportStar(require("./command/LogGetCommand"), exports);
|
|
40
|
+
__exportStar(require("./command/LogGroupCommand"), exports);
|
|
41
|
+
__exportStar(require("./command/LogGroupCreateCommand"), exports);
|
|
42
|
+
__exportStar(require("./command/LogGroupDeleteCommand"), exports);
|
|
43
|
+
__exportStar(require("./command/LogGroupGetAllCommand"), exports);
|
|
44
|
+
__exportStar(require("./command/LogGroupGetCommand"), exports);
|
|
45
|
+
__exportStar(require("./command/LogGroupUpdateCommand"), exports);
|
|
46
|
+
__exportStar(require("./row/LogRow"), exports);
|
|
47
|
+
__exportStar(require("./row/LogRowInput"), exports);
|
|
48
|
+
__exportStar(require("./row/LogRowOutput"), exports);
|
|
49
|
+
__exportStar(require("./row/LoggroupRow"), exports);
|
|
50
|
+
__exportStar(require("./row/LoggroupRowInput"), exports);
|
|
51
|
+
__exportStar(require("./row/LoggroupRowOutput"), exports);
|
|
30
52
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAqBA,kDAAgC;AAChC,kDAAgC;AAChC,mDAAiC;AACjC,+CAA6B;AAC7B,4CAA0B;AAC1B,4CAA0B;AAC1B,wCAAsB;AACtB,6CAA2B;AAC3B,2CAAyB;AACzB,wDAAsC;AACtC,4DAA0C;AAC1C,+DAA6C;AAC7C,2DAAyC;AACzC,gEAA8C;AAC9C,kDAAgC;AAChC,+CAA6B;AAC7B,wDAAsC;AACtC,2DAAyC;AACzC,8DAA4C;AAC5C,uDAAqC;AACrC,6DAA2C;AAC3C,6DAA2C;AAC3C,0DAAwC;AACxC,4DAA0C;AAC1C,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,+DAA6C;AAC7C,kEAAgD;AAChD,+CAA6B;AAC7B,oDAAkC;AAClC,qDAAmC;AACnC,oDAAkC;AAClC,yDAAuC;AACvC,0DAAwC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogRow.js","sourceRoot":"","sources":["../../src/row/LogRow.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type LogRowInput = {
|
|
2
|
+
id: (string | null);
|
|
3
|
+
user_id: (string | null);
|
|
4
|
+
product_id: (string | null);
|
|
5
|
+
project_id: (string | null);
|
|
6
|
+
log_group_id: (string | null);
|
|
7
|
+
level: (string | null);
|
|
8
|
+
message: (string | null);
|
|
9
|
+
stack: (string | null);
|
|
10
|
+
sent: (boolean | null);
|
|
11
|
+
result: (string | null);
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogRowInput.js","sourceRoot":"","sources":["../../src/row/LogRowInput.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type LogRowOutput = {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogRowOutput.js","sourceRoot":"","sources":["../../src/row/LogRowOutput.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoggroupRow.js","sourceRoot":"","sources":["../../src/row/LoggroupRow.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoggroupRowInput.js","sourceRoot":"","sources":["../../src/row/LoggroupRowInput.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoggroupRowOutput.js","sourceRoot":"","sources":["../../src/row/LoggroupRowOutput.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -3,21 +3,25 @@
|
|
|
3
3
|
"title": "Namirasoft Log",
|
|
4
4
|
"description": "Namira Software Corporation Log NPM Package",
|
|
5
5
|
"icon": "logo.png",
|
|
6
|
-
"logo": "https://static.namirasoft.com/
|
|
6
|
+
"logo": "https://static.namirasoft.com/image/namirasoft/log/logo/name.png",
|
|
7
7
|
"language": "ts",
|
|
8
8
|
"framework": "npm",
|
|
9
9
|
"application": "package",
|
|
10
10
|
"private": false,
|
|
11
|
-
"version": "1.3.
|
|
12
|
-
"main": "./dist/index.js",
|
|
13
|
-
"types": "./dist/index.d.ts",
|
|
11
|
+
"version": "1.3.7",
|
|
14
12
|
"author": "Amir Abolhasani",
|
|
15
13
|
"license": "MIT",
|
|
14
|
+
"main": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": ""
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"
|
|
21
|
-
"namirasoft-
|
|
20
|
+
"namirasoft-core": "^1.3.19",
|
|
21
|
+
"namirasoft-node-cli": "^1.3.7",
|
|
22
|
+
"namirasoft-account": "^1.3.15"
|
|
23
|
+
},
|
|
24
|
+
"bin": {
|
|
25
|
+
"ns-log": "./dist/command/cli.js"
|
|
22
26
|
}
|
|
23
27
|
}
|
package/src/FormatterFull.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { LogLevel } from "./LogLevel";
|
|
|
5
5
|
|
|
6
6
|
export class FormatterFull extends BaseFormatter implements IFormatter
|
|
7
7
|
{
|
|
8
|
-
|
|
8
|
+
format(log: Log): { pre: string[], messages: string[], post: string[] }
|
|
9
9
|
{
|
|
10
10
|
let pre: string[] = [];
|
|
11
11
|
let messages: string[] = [];
|
package/src/FormatterShort.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Log } from "./Log";
|
|
|
4
4
|
|
|
5
5
|
export class FormatterShort extends BaseFormatter implements IFormatter
|
|
6
6
|
{
|
|
7
|
-
|
|
7
|
+
format(log: Log): { pre: string[], messages: string[], post: string[] }
|
|
8
8
|
{
|
|
9
9
|
let ans: string[] = [];
|
|
10
10
|
ans.push(this.formatDateTime(log.date) + ": " + this.getMesssages(log.messages).filter(m => m).join(" - "));
|
package/src/IFormatter.ts
CHANGED
package/src/ILogger.ts
CHANGED
|
@@ -2,17 +2,17 @@ import { LogLevel } from "./LogLevel";
|
|
|
2
2
|
|
|
3
3
|
export interface ILogger
|
|
4
4
|
{
|
|
5
|
-
log(level: LogLevel, ...messages: any[]):
|
|
6
|
-
trace(...messages: any[]):
|
|
7
|
-
verbose(...messages: any[]):
|
|
8
|
-
debug(...messages: any[]):
|
|
9
|
-
info(...messages: any[]):
|
|
10
|
-
success(...messages: any[]):
|
|
11
|
-
warning(...messages: any[]):
|
|
12
|
-
error(...messages: any[]):
|
|
13
|
-
critical(...messages: any[]):
|
|
14
|
-
fatal(...messages: any[]):
|
|
15
|
-
onCatchError(error: Error | unknown):
|
|
16
|
-
onCatchCritical(error: Error | unknown):
|
|
17
|
-
onCatchFatal(error: Error | unknown):
|
|
5
|
+
log(level: LogLevel, ...messages: any[]): void;
|
|
6
|
+
trace(...messages: any[]): void;
|
|
7
|
+
verbose(...messages: any[]): void;
|
|
8
|
+
debug(...messages: any[]): void;
|
|
9
|
+
info(...messages: any[]): void;
|
|
10
|
+
success(...messages: any[]): void;
|
|
11
|
+
warning(...messages: any[]): void;
|
|
12
|
+
error(...messages: any[]): void;
|
|
13
|
+
critical(...messages: any[]): void;
|
|
14
|
+
fatal(...messages: any[]): void;
|
|
15
|
+
onCatchError(error: Error | unknown): void;
|
|
16
|
+
onCatchCritical(error: Error | unknown): void;
|
|
17
|
+
onCatchFatal(error: Error | unknown): void;
|
|
18
18
|
}
|
package/src/IStream.ts
CHANGED
package/src/Logger.ts
CHANGED
|
@@ -49,68 +49,65 @@ export class Logger implements ILogger
|
|
|
49
49
|
{
|
|
50
50
|
this.streams.push(stream);
|
|
51
51
|
}
|
|
52
|
-
|
|
52
|
+
log(level: LogLevel, ...messages: any[])
|
|
53
53
|
{
|
|
54
54
|
let log = new Log(level, ...messages);
|
|
55
55
|
let formatted: { pre: string[], messages: string[], post: string[] } = { pre: [], messages: [], post: [] };
|
|
56
56
|
let formatter = this.customFormatter[level.toString()] ?? this.formatter;
|
|
57
57
|
if (formatter)
|
|
58
|
-
formatted =
|
|
58
|
+
formatted = formatter.format(log);
|
|
59
59
|
if (this.streams.length == 0)
|
|
60
60
|
this.defaultStream.write(log, formatted);
|
|
61
61
|
else
|
|
62
|
-
|
|
63
|
-
let ps = this.streams.map(s => s.write(log, formatted));
|
|
64
|
-
await Promise.all(ps);
|
|
65
|
-
}
|
|
62
|
+
this.streams.map(s => s.write(log, formatted));
|
|
66
63
|
}
|
|
67
|
-
|
|
64
|
+
trace(...messages: any[])
|
|
68
65
|
{
|
|
69
|
-
|
|
66
|
+
this.log(LogLevel.Trace, ...messages);
|
|
70
67
|
}
|
|
71
|
-
|
|
68
|
+
verbose(...messages: any[])
|
|
72
69
|
{
|
|
73
|
-
|
|
70
|
+
this.log(LogLevel.Verbose, ...messages);
|
|
74
71
|
}
|
|
75
|
-
|
|
72
|
+
debug(...messages: any[])
|
|
76
73
|
{
|
|
77
|
-
|
|
74
|
+
this.log(LogLevel.Debug, ...messages);
|
|
78
75
|
}
|
|
79
|
-
|
|
76
|
+
info(...messages: any[])
|
|
80
77
|
{
|
|
81
|
-
|
|
78
|
+
this.log(LogLevel.Info, ...messages);
|
|
82
79
|
}
|
|
83
|
-
|
|
80
|
+
success(...messages: any[])
|
|
84
81
|
{
|
|
85
|
-
|
|
82
|
+
this.log(LogLevel.Success, ...messages);
|
|
86
83
|
}
|
|
87
|
-
|
|
84
|
+
warning(...messages: any[])
|
|
88
85
|
{
|
|
89
|
-
|
|
86
|
+
this.log(LogLevel.Warning, ...messages);
|
|
90
87
|
}
|
|
91
|
-
|
|
88
|
+
error(...messages: any[])
|
|
92
89
|
{
|
|
93
|
-
|
|
90
|
+
this.log(LogLevel.Error, ...messages);
|
|
94
91
|
}
|
|
95
|
-
|
|
92
|
+
critical(...messages: any[])
|
|
96
93
|
{
|
|
97
|
-
|
|
94
|
+
this.log(LogLevel.Critical, ...messages);
|
|
98
95
|
}
|
|
99
|
-
|
|
96
|
+
fatal(...messages: any[])
|
|
100
97
|
{
|
|
101
|
-
|
|
98
|
+
this.log(LogLevel.Fatal, ...messages);
|
|
102
99
|
}
|
|
103
|
-
|
|
100
|
+
onCatchError(error: Error | unknown)
|
|
104
101
|
{
|
|
105
|
-
|
|
102
|
+
this.error(this.getErrorMessage(error), this.getErrorStack(error));
|
|
106
103
|
}
|
|
107
|
-
|
|
104
|
+
onCatchCritical(error: Error | unknown)
|
|
108
105
|
{
|
|
109
|
-
|
|
106
|
+
this.critical(this.getErrorMessage(error), this.getErrorStack(error));
|
|
110
107
|
}
|
|
111
|
-
|
|
108
|
+
onCatchFatal(error: Error | unknown)
|
|
112
109
|
{
|
|
113
|
-
|
|
110
|
+
this.fatal(this.getErrorMessage(error), this.getErrorStack(error));
|
|
114
111
|
}
|
|
115
112
|
protected getErrorMessage(error: Error | unknown): string
|
|
116
113
|
{
|