Commit 01eaf2c5 authored by Annie Ke's avatar Annie Ke Committed by GitHub

feat: add extra logs to DTL (#439)

* feat: add extra logs to DTL

* chore: add changeset
Co-authored-by: default avatarGeorgios Konstantopoulos <me@gakonst.com>
parent 3c92bdb4
---
"@eth-optimism/core-utils": patch
"@eth-optimism/data-transport-layer": patch
---
added extra logs to base-service / dtl to improve observability
......@@ -36,7 +36,9 @@ export class BaseService<T> {
this.logger.info('Service is initializing...')
await this._init()
this.logger.info('Service has initialized.')
this.logger.info('Service has initialized.', {
options: this.options,
})
this.initialized = true
}
......
......@@ -54,6 +54,8 @@ export class L1DataTransportService extends BaseService<L1DataTransportServiceOp
} = {} as any
protected async _init(): Promise<void> {
this.logger.info('Initializing L1 Data Transport Service...')
this.state.db = level(this.options.dbPath)
await this.state.db.open()
......
......@@ -130,6 +130,11 @@ export class L1TransportServer extends BaseService<L1TransportServerOptions> {
url: req.url,
elapsed,
})
this.logger.debug('Response body', {
method: req.method,
url: req.url,
body: json,
})
return res.json(json)
} catch (e) {
const elapsed = Date.now() - start
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment