@nsshunt/stsappframework 3.0.173 → 3.0.175
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/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/stsAppFrameworkTransportWinston.js +24 -0
- package/dist/stsAppFrameworkTransportWinston.js.map +1 -0
- package/dist/stsTransportWinston.js +43 -0
- package/dist/stsTransportWinston.js.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +2 -1
- package/src/stsAppFrameworkTransportWinston.ts +28 -0
- package/src/stsTransportWinston.ts +48 -0
- package/types/index.d.ts +2 -1
- package/types/index.d.ts.map +1 -1
- package/types/stsAppFrameworkTransportWinston.d.ts +12 -0
- package/types/stsAppFrameworkTransportWinston.d.ts.map +1 -0
- package/types/stsTransportWinston.d.ts +15 -0
- package/types/stsTransportWinston.d.ts.map +1 -0
- package/dist/winstonTransport.js +0 -34
- package/dist/winstonTransport.js.map +0 -1
- package/src/winstonTransport.ts +0 -39
- package/types/winstonTransport.d.ts +0 -14
- package/types/winstonTransport.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -36,5 +36,6 @@ __exportStar(require("./influxdb/influxDBManagerService"), exports);
|
|
|
36
36
|
__exportStar(require("./influxdb/influxDBManagerAgent"), exports);
|
|
37
37
|
__exportStar(require("./publishertransports/publishTransportUtils"), exports);
|
|
38
38
|
__exportStar(require("./instrumentationsubscriber"), exports);
|
|
39
|
-
__exportStar(require("./
|
|
39
|
+
__exportStar(require("./stsTransportWinston"), exports);
|
|
40
|
+
__exportStar(require("./stsAppFrameworkTransportWinston"), exports);
|
|
40
41
|
//# 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":";;;;;;;;;;;;;;;;AAAA,gDAA6B;AAC7B,mDAAgC;AAChC,6CAA0B;AAC1B,kDAA+B;AAC/B,kDAA+B;AAC/B,sDAAmC;AACnC,sDAAmC;AACnC,sDAAmC;AACnC,sDAAmC;AACnC,yDAAsC;AACtC,yDAAsC;AACtC,oDAAiC;AACjC,uDAAoC;AACpC,wDAAqC;AACrC,wDAAqC;AACrC,yDAAsC;AACtC,6DAA0C;AAC1C,iEAA8C;AAC9C,oEAAiD;AACjD,kEAA+C;AAC/C,8EAA2D;AAC3D,8DAA2C;AAC3C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA6B;AAC7B,mDAAgC;AAChC,6CAA0B;AAC1B,kDAA+B;AAC/B,kDAA+B;AAC/B,sDAAmC;AACnC,sDAAmC;AACnC,sDAAmC;AACnC,sDAAmC;AACnC,yDAAsC;AACtC,yDAAsC;AACtC,oDAAiC;AACjC,uDAAoC;AACpC,wDAAqC;AACrC,wDAAqC;AACrC,yDAAsC;AACtC,6DAA0C;AAC1C,iEAA8C;AAC9C,oEAAiD;AACjD,kEAA+C;AAC/C,8EAA2D;AAC3D,8DAA2C;AAC3C,wDAAqC;AACrC,oEAAiD"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.STSAppFrameworkTransportWinston = void 0;
|
|
7
|
+
/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF
|
|
8
|
+
const winston_transport_1 = __importDefault(require("winston-transport"));
|
|
9
|
+
class STSAppFrameworkTransportWinston extends winston_transport_1.default {
|
|
10
|
+
#options;
|
|
11
|
+
constructor(opts) {
|
|
12
|
+
super(opts);
|
|
13
|
+
this.#options = opts;
|
|
14
|
+
}
|
|
15
|
+
log(info, callback) {
|
|
16
|
+
//setImmediate(() => {
|
|
17
|
+
this.#options.app.LogEx(info.message);
|
|
18
|
+
this.emit('logged', info);
|
|
19
|
+
callback();
|
|
20
|
+
//});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.STSAppFrameworkTransportWinston = STSAppFrameworkTransportWinston;
|
|
24
|
+
//# sourceMappingURL=stsAppFrameworkTransportWinston.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stsAppFrameworkTransportWinston.js","sourceRoot":"","sources":["../src/stsAppFrameworkTransportWinston.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAkD,CAAE,UAAU;AAC9D,0EAAqE;AASrE,MAAa,+BAAgC,SAAQ,2BAAS;IAE1D,QAAQ,CAA0C;IAElD,YAAY,IAA6C;QACrD,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACzB,CAAC;IAED,GAAG,CAAC,IAAS,EAAE,QAAa;QACxB,sBAAsB;QACtB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAEtC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC1B,QAAQ,EAAE,CAAC;QACX,KAAK;IACT,CAAC;CACJ;AAjBD,0EAiBC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.STSTransportWinston = exports.UpdateSTSTransportWithDebugger = void 0;
|
|
7
|
+
/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF
|
|
8
|
+
const winston_transport_1 = __importDefault(require("winston-transport"));
|
|
9
|
+
function UpdateSTSTransportWithDebugger(logger, newDebugger) {
|
|
10
|
+
const stsTransport = logger.transports.find((transport) => {
|
|
11
|
+
return transport instanceof STSTransportWinston;
|
|
12
|
+
});
|
|
13
|
+
if (stsTransport) {
|
|
14
|
+
stsTransport.debugger = newDebugger;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.UpdateSTSTransportWithDebugger = UpdateSTSTransportWithDebugger;
|
|
18
|
+
class STSTransportWinston extends winston_transport_1.default {
|
|
19
|
+
#options;
|
|
20
|
+
constructor(opts) {
|
|
21
|
+
super(opts);
|
|
22
|
+
this.#options = opts;
|
|
23
|
+
}
|
|
24
|
+
get debugger() {
|
|
25
|
+
return this.#options.debugger;
|
|
26
|
+
}
|
|
27
|
+
set debugger(newDebugger) {
|
|
28
|
+
this.#options.debugger = newDebugger;
|
|
29
|
+
}
|
|
30
|
+
log(info, callback) {
|
|
31
|
+
//setImmediate(() => {
|
|
32
|
+
if (info[Symbol.for('level')] == 'debug') {
|
|
33
|
+
if (this.#options.debugger) {
|
|
34
|
+
this.#options.debugger(info.message);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
this.emit('logged', info);
|
|
38
|
+
callback();
|
|
39
|
+
//});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.STSTransportWinston = STSTransportWinston;
|
|
43
|
+
//# sourceMappingURL=stsTransportWinston.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stsTransportWinston.js","sourceRoot":"","sources":["../src/stsTransportWinston.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAkD,CAAE,UAAU;AAC9D,0EAAqE;AASrE,SAAgB,8BAA8B,CAAC,MAAW,EAAE,WAAgB;IACxE,MAAM,YAAY,GAA0B,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,SAAc,EAAE,EAAE;QAClF,OAAO,SAAS,YAAY,mBAAmB,CAAA;IACnD,CAAC,CAAC,CAAC;IACH,IAAI,YAAY,EAAE,CAAC;QACd,YAAoC,CAAC,QAAQ,GAAG,WAAW,CAAA;IAChE,CAAC;AACL,CAAC;AAPD,wEAOC;AAED,MAAa,mBAAoB,SAAQ,2BAAS;IAE9C,QAAQ,CAA8B;IAEtC,YAAY,IAAiC;QACzC,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACzB,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAClC,CAAC;IAED,IAAI,QAAQ,CAAC,WAAiC;QAC1C,IAAI,CAAC,QAAQ,CAAC,QAAQ,GAAG,WAAW,CAAC;IACzC,CAAC;IAED,GAAG,CAAC,IAAS,EAAE,QAAa;QACxB,sBAAsB;QACtB,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,OAAO,EAAE,CAAC;YACvC,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;gBACzB,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACzC,CAAC;QACL,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC1B,QAAQ,EAAE,CAAC;QACX,KAAK;IACT,CAAC;CACJ;AA5BD,kDA4BC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -20,4 +20,5 @@ export * from './influxdb/influxDBManagerService'
|
|
|
20
20
|
export * from './influxdb/influxDBManagerAgent'
|
|
21
21
|
export * from './publishertransports/publishTransportUtils'
|
|
22
22
|
export * from './instrumentationsubscriber'
|
|
23
|
-
export * from './
|
|
23
|
+
export * from './stsTransportWinston'
|
|
24
|
+
export * from './stsAppFrameworkTransportWinston'
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF
|
|
2
|
+
import Transport, { TransportStreamOptions } from 'winston-transport'
|
|
3
|
+
|
|
4
|
+
import { IProcessBase } from './commonTypes'
|
|
5
|
+
|
|
6
|
+
export interface ISTSAppFrameworkTransportWinstonOptions extends TransportStreamOptions {
|
|
7
|
+
stsContext: string
|
|
8
|
+
app: IProcessBase
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class STSAppFrameworkTransportWinston extends Transport {
|
|
12
|
+
|
|
13
|
+
#options: ISTSAppFrameworkTransportWinstonOptions;
|
|
14
|
+
|
|
15
|
+
constructor(opts: ISTSAppFrameworkTransportWinstonOptions) {
|
|
16
|
+
super(opts);
|
|
17
|
+
this.#options = opts;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
log(info: any, callback: any) {
|
|
21
|
+
//setImmediate(() => {
|
|
22
|
+
this.#options.app.LogEx(info.message);
|
|
23
|
+
|
|
24
|
+
this.emit('logged', info);
|
|
25
|
+
callback();
|
|
26
|
+
//});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF
|
|
2
|
+
import Transport, { TransportStreamOptions } from 'winston-transport'
|
|
3
|
+
|
|
4
|
+
import debugModule from 'debug'
|
|
5
|
+
|
|
6
|
+
export interface ISTSTransportWinstonOptions extends TransportStreamOptions {
|
|
7
|
+
stsContext: string
|
|
8
|
+
debugger?: debugModule.Debugger
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function UpdateSTSTransportWithDebugger(logger: any, newDebugger: any): void {
|
|
12
|
+
const stsTransport: Transport | undefined = logger.transports.find((transport: any) => {
|
|
13
|
+
return transport instanceof STSTransportWinston
|
|
14
|
+
});
|
|
15
|
+
if (stsTransport) {
|
|
16
|
+
(stsTransport as STSTransportWinston).debugger = newDebugger
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export class STSTransportWinston extends Transport {
|
|
21
|
+
|
|
22
|
+
#options: ISTSTransportWinstonOptions;
|
|
23
|
+
|
|
24
|
+
constructor(opts: ISTSTransportWinstonOptions) {
|
|
25
|
+
super(opts);
|
|
26
|
+
this.#options = opts;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
get debugger() : debugModule.Debugger | undefined {
|
|
30
|
+
return this.#options.debugger;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
set debugger(newDebugger: debugModule.Debugger) {
|
|
34
|
+
this.#options.debugger = newDebugger;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
log(info: any, callback: any) {
|
|
38
|
+
//setImmediate(() => {
|
|
39
|
+
if (info[Symbol.for('level')] == 'debug') {
|
|
40
|
+
if (this.#options.debugger) {
|
|
41
|
+
this.#options.debugger(info.message);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
this.emit('logged', info);
|
|
45
|
+
callback();
|
|
46
|
+
//});
|
|
47
|
+
}
|
|
48
|
+
}
|
package/types/index.d.ts
CHANGED
|
@@ -20,5 +20,6 @@ export * from './influxdb/influxDBManagerService';
|
|
|
20
20
|
export * from './influxdb/influxDBManagerAgent';
|
|
21
21
|
export * from './publishertransports/publishTransportUtils';
|
|
22
22
|
export * from './instrumentationsubscriber';
|
|
23
|
-
export * from './
|
|
23
|
+
export * from './stsTransportWinston';
|
|
24
|
+
export * from './stsAppFrameworkTransportWinston';
|
|
24
25
|
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,mCAAmC,CAAA;AACjD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,6CAA6C,CAAA;AAC3D,cAAc,6BAA6B,CAAA;AAC3C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,mCAAmC,CAAA;AACjD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,6CAA6C,CAAA;AAC3D,cAAc,6BAA6B,CAAA;AAC3C,cAAc,uBAAuB,CAAA;AACrC,cAAc,mCAAmC,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import Transport, { TransportStreamOptions } from 'winston-transport';
|
|
2
|
+
import { IProcessBase } from './commonTypes';
|
|
3
|
+
export interface ISTSAppFrameworkTransportWinstonOptions extends TransportStreamOptions {
|
|
4
|
+
stsContext: string;
|
|
5
|
+
app: IProcessBase;
|
|
6
|
+
}
|
|
7
|
+
export declare class STSAppFrameworkTransportWinston extends Transport {
|
|
8
|
+
#private;
|
|
9
|
+
constructor(opts: ISTSAppFrameworkTransportWinstonOptions);
|
|
10
|
+
log(info: any, callback: any): void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=stsAppFrameworkTransportWinston.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stsAppFrameworkTransportWinston.d.ts","sourceRoot":"","sources":["../src/stsAppFrameworkTransportWinston.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,EAAE,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAE5C,MAAM,WAAW,uCAAwC,SAAQ,sBAAsB;IACnF,UAAU,EAAE,MAAM,CAAA;IAClB,GAAG,EAAE,YAAY,CAAA;CACpB;AAED,qBAAa,+BAAgC,SAAQ,SAAS;;gBAI9C,IAAI,EAAE,uCAAuC;IAKzD,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG;CAQ/B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Transport, { TransportStreamOptions } from 'winston-transport';
|
|
2
|
+
import debugModule from 'debug';
|
|
3
|
+
export interface ISTSTransportWinstonOptions extends TransportStreamOptions {
|
|
4
|
+
stsContext: string;
|
|
5
|
+
debugger?: debugModule.Debugger;
|
|
6
|
+
}
|
|
7
|
+
export declare function UpdateSTSTransportWithDebugger(logger: any, newDebugger: any): void;
|
|
8
|
+
export declare class STSTransportWinston extends Transport {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(opts: ISTSTransportWinstonOptions);
|
|
11
|
+
get debugger(): debugModule.Debugger | undefined;
|
|
12
|
+
set debugger(newDebugger: debugModule.Debugger);
|
|
13
|
+
log(info: any, callback: any): void;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=stsTransportWinston.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stsTransportWinston.d.ts","sourceRoot":"","sources":["../src/stsTransportWinston.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,EAAE,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAErE,OAAO,WAAW,MAAM,OAAO,CAAA;AAE/B,MAAM,WAAW,2BAA4B,SAAQ,sBAAsB;IACvE,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAA;CAClC;AAED,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,GAAG,IAAI,CAOlF;AAED,qBAAa,mBAAoB,SAAQ,SAAS;;gBAIlC,IAAI,EAAE,2BAA2B;IAK7C,IAAI,QAAQ,IAAK,WAAW,CAAC,QAAQ,GAAG,SAAS,CAEhD;IAED,IAAI,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,QAAQ,EAE7C;IAED,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG;CAW/B"}
|
package/dist/winstonTransport.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.STSWinstonTransport = void 0;
|
|
7
|
-
/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF
|
|
8
|
-
const winston_transport_1 = __importDefault(require("winston-transport"));
|
|
9
|
-
class STSWinstonTransport extends winston_transport_1.default {
|
|
10
|
-
myopts;
|
|
11
|
-
constructor(opts) {
|
|
12
|
-
super(opts);
|
|
13
|
-
this.myopts = opts;
|
|
14
|
-
}
|
|
15
|
-
get debugger() {
|
|
16
|
-
return this.myopts.debugger;
|
|
17
|
-
}
|
|
18
|
-
set debugger(newDebugger) {
|
|
19
|
-
this.myopts.debugger = newDebugger;
|
|
20
|
-
}
|
|
21
|
-
log(info, callback) {
|
|
22
|
-
//setImmediate(() => {
|
|
23
|
-
if (info[Symbol.for('level')] == 'debug') {
|
|
24
|
-
if (this.myopts.debugger) {
|
|
25
|
-
this.myopts.debugger(info.message);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
this.emit('logged', info);
|
|
29
|
-
callback();
|
|
30
|
-
//});
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.STSWinstonTransport = STSWinstonTransport;
|
|
34
|
-
//# sourceMappingURL=winstonTransport.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"winstonTransport.js","sourceRoot":"","sources":["../src/winstonTransport.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAkD,CAAE,UAAU;AAC9D,0EAAqE;AASrE,MAAa,mBAAoB,SAAQ,2BAAS;IAE9C,MAAM,CAAuB;IAE7B,YAAY,IAA0B;QAClC,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IACvB,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;IAChC,CAAC;IAED,IAAI,QAAQ,CAAC,WAAiC;QAC1C,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,WAAW,CAAC;IACvC,CAAC;IAED,GAAG,CAAC,IAAS,EAAE,QAAa;QACxB,sBAAsB;QACtB,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,OAAO,EAAE,CAAC;YACvC,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;gBACvB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACvC,CAAC;QACL,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC1B,QAAQ,EAAE,CAAC;QACX,KAAK;IACT,CAAC;CACJ;AA5BD,kDA4BC"}
|
package/src/winstonTransport.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF
|
|
2
|
-
import Transport, { TransportStreamOptions } from 'winston-transport'
|
|
3
|
-
|
|
4
|
-
import debugModule from 'debug'
|
|
5
|
-
|
|
6
|
-
export interface ISTSWinstonTransport extends TransportStreamOptions {
|
|
7
|
-
stsContext: string
|
|
8
|
-
debugger?: debugModule.Debugger
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export class STSWinstonTransport extends Transport {
|
|
12
|
-
|
|
13
|
-
myopts: ISTSWinstonTransport;
|
|
14
|
-
|
|
15
|
-
constructor(opts: ISTSWinstonTransport) {
|
|
16
|
-
super(opts);
|
|
17
|
-
this.myopts = opts;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
get debugger() : debugModule.Debugger | undefined {
|
|
21
|
-
return this.myopts.debugger;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
set debugger(newDebugger: debugModule.Debugger) {
|
|
25
|
-
this.myopts.debugger = newDebugger;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
log(info: any, callback: any) {
|
|
29
|
-
//setImmediate(() => {
|
|
30
|
-
if (info[Symbol.for('level')] == 'debug') {
|
|
31
|
-
if (this.myopts.debugger) {
|
|
32
|
-
this.myopts.debugger(info.message);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
this.emit('logged', info);
|
|
36
|
-
callback();
|
|
37
|
-
//});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import Transport, { TransportStreamOptions } from 'winston-transport';
|
|
2
|
-
import debugModule from 'debug';
|
|
3
|
-
export interface ISTSWinstonTransport extends TransportStreamOptions {
|
|
4
|
-
stsContext: string;
|
|
5
|
-
debugger?: debugModule.Debugger;
|
|
6
|
-
}
|
|
7
|
-
export declare class STSWinstonTransport extends Transport {
|
|
8
|
-
myopts: ISTSWinstonTransport;
|
|
9
|
-
constructor(opts: ISTSWinstonTransport);
|
|
10
|
-
get debugger(): debugModule.Debugger | undefined;
|
|
11
|
-
set debugger(newDebugger: debugModule.Debugger);
|
|
12
|
-
log(info: any, callback: any): void;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=winstonTransport.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"winstonTransport.d.ts","sourceRoot":"","sources":["../src/winstonTransport.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,EAAE,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAErE,OAAO,WAAW,MAAM,OAAO,CAAA;AAE/B,MAAM,WAAW,oBAAqB,SAAQ,sBAAsB;IAChE,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAA;CAClC;AAED,qBAAa,mBAAoB,SAAQ,SAAS;IAE9C,MAAM,EAAE,oBAAoB,CAAC;gBAEjB,IAAI,EAAE,oBAAoB;IAKtC,IAAI,QAAQ,IAAK,WAAW,CAAC,QAAQ,GAAG,SAAS,CAEhD;IAED,IAAI,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,QAAQ,EAE7C;IAED,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG;CAW/B"}
|