hedera-json-rpc-relay
hedera-json-rpc-relay copied to clipboard
nit: move logger child names into a constant
Problem
Currently, there are many child instances of the logger instantiated with abitrary names. They all can be grouped in a constant.
Solution
For example:
// constants.ts
LOGGER_CHILD_NAME: {
....
cacheService: 'cache-service',
}
// relay.ts
...
- this.cacheService = new CacheService(logger.child({ name: 'cache-service' }), register);
+ this.cacheService = new CacheService(logger.child({ name: constants.LOGGER_CHILD_NAME.cacheService }), register);
...
Alternatives
No response