@sentio/runtime 2.57.5-rc.2 → 2.57.6-rc.1
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/lib/processor-runner.js +1 -1
- package/lib/processor-runner.js.map +1 -1
- package/package.json +1 -1
- package/src/logger.ts +6 -10
- package/src/processor-runner.ts +2 -1
package/package.json
CHANGED
package/src/logger.ts
CHANGED
@@ -1,20 +1,16 @@
|
|
1
1
|
import { createLogger, format, transports } from 'winston'
|
2
2
|
|
3
|
-
function stringify(obj: any) {
|
4
|
-
|
5
|
-
|
3
|
+
function stringify(obj: any): string {
|
4
|
+
const cache = new WeakSet()
|
5
|
+
return JSON.stringify(obj, function (key, value) {
|
6
6
|
if (typeof value === 'object' && value !== null) {
|
7
|
-
if (cache.
|
8
|
-
|
9
|
-
return
|
7
|
+
if (cache.has(value)) {
|
8
|
+
return '[Circular]'
|
10
9
|
}
|
11
|
-
|
12
|
-
cache.push(value)
|
10
|
+
cache.add(value)
|
13
11
|
}
|
14
12
|
return value
|
15
13
|
})
|
16
|
-
cache = []
|
17
|
-
return str
|
18
14
|
}
|
19
15
|
|
20
16
|
export function setupLogger(json: boolean, enableDebug: boolean) {
|
package/src/processor-runner.ts
CHANGED
@@ -41,6 +41,7 @@ const optionDefinitions = [
|
|
41
41
|
{ name: 'pricefeed-server', type: String, defaultValue: '' },
|
42
42
|
{ name: 'log-format', type: String, defaultValue: 'console' },
|
43
43
|
{ name: 'debug', type: Boolean, defaultValue: false },
|
44
|
+
{ name: 'otlp-debug', type: Boolean, defaultValue: false },
|
44
45
|
{ name: 'start-action-server', type: Boolean, defaultValue: false }
|
45
46
|
]
|
46
47
|
|
@@ -51,7 +52,7 @@ const logLevel = process.env['LOG_LEVEL']?.toUpperCase()
|
|
51
52
|
setupLogger(options['log-format'] === 'json', logLevel === 'debug' ? true : options.debug)
|
52
53
|
console.debug('Starting with', options.target)
|
53
54
|
|
54
|
-
await setupOTLP(options
|
55
|
+
await setupOTLP(options['otlp-debug'])
|
55
56
|
|
56
57
|
Error.stackTraceLimit = 20
|
57
58
|
|