@nu-art/ts-common 0.200.125 → 0.200.127
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/core/error-handling.d.ts
CHANGED
|
@@ -8,7 +8,11 @@ export declare enum ServerErrorSeverity {
|
|
|
8
8
|
Critical = "Critical"
|
|
9
9
|
}
|
|
10
10
|
export declare const ServerErrorSeverity_Ordinal: ServerErrorSeverity[];
|
|
11
|
+
export type ErrorMessage = {
|
|
12
|
+
message: string;
|
|
13
|
+
innerMessages?: string[];
|
|
14
|
+
};
|
|
11
15
|
export interface OnApplicationError {
|
|
12
|
-
__processApplicationError(errorLevel: ServerErrorSeverity, module: Module, message:
|
|
16
|
+
__processApplicationError(errorLevel: ServerErrorSeverity, module: Module, message: ErrorMessage): Promise<void>;
|
|
13
17
|
}
|
|
14
|
-
export declare const dispatch_onServerError: Dispatcher<OnApplicationError, "__processApplicationError", [errorLevel: ServerErrorSeverity, module: Module<any, any>, message:
|
|
18
|
+
export declare const dispatch_onServerError: Dispatcher<OnApplicationError, "__processApplicationError", [errorLevel: ServerErrorSeverity, module: Module<any, any>, message: ErrorMessage], void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LogClient_BaseRotate } from "./LogClient_BaseRotate";
|
|
2
2
|
export declare class LogClient_MemBuffer extends LogClient_BaseRotate {
|
|
3
3
|
readonly buffers: string[];
|
|
4
|
-
constructor(name: string,
|
|
4
|
+
constructor(name: string, maxBuffers?: number, maxBufferSize?: number);
|
|
5
5
|
protected printLogMessage(log: string): void;
|
|
6
6
|
protected cleanup(): void;
|
|
7
7
|
protected rotateBuffer(fromIndex: number, toIndex: number): void;
|
|
@@ -21,8 +21,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
21
21
|
exports.LogClient_MemBuffer = void 0;
|
|
22
22
|
const LogClient_BaseRotate_1 = require("./LogClient_BaseRotate");
|
|
23
23
|
class LogClient_MemBuffer extends LogClient_BaseRotate_1.LogClient_BaseRotate {
|
|
24
|
-
constructor(name,
|
|
25
|
-
super(name,
|
|
24
|
+
constructor(name, maxBuffers = 10, maxBufferSize = 1024 * 1024) {
|
|
25
|
+
super(name, maxBuffers, maxBufferSize);
|
|
26
26
|
this.buffers = [""];
|
|
27
27
|
}
|
|
28
28
|
printLogMessage(log) {
|