hedera-json-rpc-relay icon indicating copy to clipboard operation
hedera-json-rpc-relay copied to clipboard

nit: move logger child names into a constant

Open quiet-node opened this issue 1 year ago • 0 comments

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

quiet-node avatar Sep 10 '24 21:09 quiet-node