switched all console logs to logger
This commit is contained in:
parent
3877902ff4
commit
a3f2f199b4
14 changed files with 125 additions and 122 deletions
|
|
@ -9,7 +9,7 @@ export function registerCacheServices(
|
|||
): void {
|
||||
if (config.redis.enabled) {
|
||||
container.register({
|
||||
cache: asFunction(() => {
|
||||
cache: asFunction(({ logger }) => {
|
||||
const { createServiceCache } = require('@stock-bot/queue');
|
||||
// Get standardized service name from config
|
||||
const serviceName = config.service?.serviceName || config.service?.name || 'unknown';
|
||||
|
|
@ -20,11 +20,11 @@ export function registerCacheServices(
|
|||
port: config.redis.port,
|
||||
password: config.redis.password,
|
||||
db: config.redis.db, // This will be overridden by ServiceCache
|
||||
});
|
||||
}, { logger });
|
||||
}).singleton(),
|
||||
|
||||
// Also provide global cache for shared data
|
||||
globalCache: asFunction(() => {
|
||||
globalCache: asFunction(({ logger }) => {
|
||||
const { createServiceCache } = require('@stock-bot/queue');
|
||||
const serviceName = config.service?.serviceName || config.service?.name || 'unknown';
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ export function registerCacheServices(
|
|||
host: config.redis.host,
|
||||
port: config.redis.port,
|
||||
password: config.redis.password,
|
||||
}, { global: true });
|
||||
}, { global: true, logger });
|
||||
}).singleton(),
|
||||
});
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue