@riocrypto/common-server 1.0.1553 → 1.0.1555
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.
|
@@ -60,7 +60,7 @@ class SecretManagerClient {
|
|
|
60
60
|
if (this.env === common_1.RioEnv.Development) {
|
|
61
61
|
file = "dev-secrets";
|
|
62
62
|
}
|
|
63
|
-
else if (this.env === common_1.RioEnv.Sandbox) {
|
|
63
|
+
else if (this.env === common_1.RioEnv.Sandbox || this.env === common_1.RioEnv.Local) {
|
|
64
64
|
file = "sandbox-secrets";
|
|
65
65
|
}
|
|
66
66
|
else if (this.env === common_1.RioEnv.Staging) {
|
package/build/services/logger.js
CHANGED
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const common_1 = require("@riocrypto/common");
|
|
12
13
|
const winston_1 = require("winston");
|
|
13
14
|
const MAX_LEVEL = "info";
|
|
14
15
|
class LoggerService {
|
|
@@ -23,18 +24,27 @@ class LoggerService {
|
|
|
23
24
|
}
|
|
24
25
|
initLogger() {
|
|
25
26
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
if (process.env.RIO_ENV !== common_1.RioEnv.Local) {
|
|
28
|
+
const { getWinsonTransport } = yield require("@hyperdx/node-opentelemetry");
|
|
29
|
+
this.logger = (0, winston_1.createLogger)({
|
|
30
|
+
level: MAX_LEVEL,
|
|
31
|
+
format: winston_1.format.combine(winston_1.format.timestamp(), winston_1.format.json(), winston_1.format.metadata(), winston_1.format.prettyPrint()),
|
|
32
|
+
transports: [
|
|
33
|
+
new winston_1.transports.Console(),
|
|
34
|
+
getWinsonTransport(MAX_LEVEL, {
|
|
35
|
+
apiKey: process.env.HYPERDX_API_KEY,
|
|
36
|
+
service: process.env.OTEL_SERVICE_NAME,
|
|
37
|
+
}),
|
|
38
|
+
],
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
this.logger = (0, winston_1.createLogger)({
|
|
43
|
+
level: MAX_LEVEL,
|
|
44
|
+
format: winston_1.format.combine(winston_1.format.timestamp(), winston_1.format.json(), winston_1.format.metadata(), winston_1.format.prettyPrint()),
|
|
45
|
+
transports: [new winston_1.transports.Console()],
|
|
46
|
+
});
|
|
47
|
+
}
|
|
38
48
|
});
|
|
39
49
|
}
|
|
40
50
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1555",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@google-cloud/storage": "^6.9.5",
|
|
29
29
|
"@google-cloud/vision": "^4.0.2",
|
|
30
30
|
"@hyperdx/node-opentelemetry": "^0.4.2",
|
|
31
|
-
"@riocrypto/common": "^1.0.
|
|
31
|
+
"@riocrypto/common": "^1.0.1389",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.6.0",
|
|
34
34
|
"ccxt": "^3.0.30",
|