@rxdi/graphql-rabbitmq-subscriptions 0.7.264 → 0.7.265
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/child-logger.d.ts +4 -0
- package/dist/child-logger.js +9 -3
- package/package.json +2 -2
package/dist/child-logger.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/** PUBSUB_LOGGING=1 | true | yes turns the message log on. Anything else -
|
|
2
|
+
"false" and "0" included - is off: a non-empty "false" used to turn it ON,
|
|
3
|
+
and every message (sign-in tokens in them) was printed in production. */
|
|
4
|
+
export declare const pubsubLogging: () => boolean;
|
|
1
5
|
export declare function createChildLogger(logger: Logger, className: string): {
|
|
2
6
|
trace: (...message: any[]) => void;
|
|
3
7
|
error: (...message: any[]) => void;
|
package/dist/child-logger.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pubsubLogging = void 0;
|
|
3
4
|
exports.createChildLogger = createChildLogger;
|
|
5
|
+
/** PUBSUB_LOGGING=1 | true | yes turns the message log on. Anything else -
|
|
6
|
+
"false" and "0" included - is off: a non-empty "false" used to turn it ON,
|
|
7
|
+
and every message (sign-in tokens in them) was printed in production. */
|
|
8
|
+
const pubsubLogging = () => { var _a; return /^(1|true|yes|on)$/i.test(String((_a = process.env.PUBSUB_LOGGING) !== null && _a !== void 0 ? _a : '').trim()); };
|
|
9
|
+
exports.pubsubLogging = pubsubLogging;
|
|
4
10
|
function createChildLogger(logger, className) {
|
|
5
11
|
return {
|
|
6
|
-
trace: (...message) =>
|
|
7
|
-
error: (...message) =>
|
|
8
|
-
debug: (...message) =>
|
|
12
|
+
trace: (...message) => (0, exports.pubsubLogging)() && console.log(...message),
|
|
13
|
+
error: (...message) => (0, exports.pubsubLogging)() && console.error(...message),
|
|
14
|
+
debug: (...message) => (0, exports.pubsubLogging)() && console.log(...message),
|
|
9
15
|
};
|
|
10
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxdi/graphql-rabbitmq-subscriptions",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.265",
|
|
4
4
|
"description": "A graphql-subscriptions PubSub Engine using RabbitMQ",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"lint": "tslint ./src/**/*.ts"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@rxdi/rabbitmq-pubsub": "^0.7.
|
|
26
|
+
"@rxdi/rabbitmq-pubsub": "^0.7.264",
|
|
27
27
|
"graphql-subscriptions": "^3.0.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|