switched all console logs to logger

This commit is contained in:
Boki 2025-06-23 11:34:58 -04:00
parent 3877902ff4
commit a3f2f199b4
14 changed files with 125 additions and 122 deletions

View file

@ -13,7 +13,8 @@ export class ServiceCache implements CacheProvider {
constructor(
serviceName: string,
redisConfig: RedisConfig,
isGlobalCache: boolean = false
isGlobalCache: boolean = false,
logger?: any
) {
// Get service configuration
const serviceConfig = getServiceConfig(serviceName);
@ -42,6 +43,7 @@ export class ServiceCache implements CacheProvider {
db,
},
keyPrefix: prefix + ':',
logger,
};
this.cache = createCache(cacheConfig);
@ -161,7 +163,7 @@ export class ServiceCache implements CacheProvider {
export function createServiceCache(
serviceName: string,
redisConfig: RedisConfig,
options: { global?: boolean } = {}
options: { global?: boolean; logger?: any } = {}
): ServiceCache {
return new ServiceCache(serviceName, redisConfig, options.global);
return new ServiceCache(serviceName, redisConfig, options.global, options.logger);
}