mirror of
https://github.com/fosrl/pangolin.git
synced 2026-09-12 14:01:18 +02:00
Quiet up logs
This commit is contained in:
+10
-10
@@ -97,11 +97,11 @@ class AdaptiveCache {
|
|||||||
const value = await redisManager.get(key);
|
const value = await redisManager.get(key);
|
||||||
|
|
||||||
if (value !== null) {
|
if (value !== null) {
|
||||||
logger.debug(`Cache hit in Redis: ${key}`);
|
// logger.debug(`Cache hit in Redis: ${key}`);
|
||||||
return JSON.parse(value) as T;
|
return JSON.parse(value) as T;
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.debug(`Cache miss in Redis: ${key}`);
|
// logger.debug(`Cache miss in Redis: ${key}`);
|
||||||
return undefined;
|
return undefined;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error(`Redis get error for key ${key}:`, error);
|
logger.error(`Redis get error for key ${key}:`, error);
|
||||||
@@ -134,7 +134,7 @@ class AdaptiveCache {
|
|||||||
const success = await redisManager.del(k);
|
const success = await redisManager.del(k);
|
||||||
if (success) {
|
if (success) {
|
||||||
deletedCount++;
|
deletedCount++;
|
||||||
logger.debug(`Deleted key from Redis: ${k}`);
|
// logger.debug(`Deleted key from Redis: ${k}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,7 +161,7 @@ class AdaptiveCache {
|
|||||||
const success = localCache.del(k);
|
const success = localCache.del(k);
|
||||||
if (success > 0) {
|
if (success > 0) {
|
||||||
deletedCount++;
|
deletedCount++;
|
||||||
logger.debug(`Deleted key from local cache: ${k}`);
|
// logger.debug(`Deleted key from local cache: ${k}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -229,7 +229,7 @@ class AdaptiveCache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
localCache.flushAll();
|
localCache.flushAll();
|
||||||
logger.debug("Flushed local cache");
|
// logger.debug("Flushed local cache");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -332,7 +332,7 @@ class RegionalAdaptiveCache {
|
|||||||
redisTtl
|
redisTtl
|
||||||
);
|
);
|
||||||
if (success) {
|
if (success) {
|
||||||
logger.debug(`[regional] Set key in Redis: ${key}`);
|
// logger.debug(`[regional] Set key in Redis: ${key}`);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -353,10 +353,10 @@ class RegionalAdaptiveCache {
|
|||||||
try {
|
try {
|
||||||
const value = await regionalRedisManager.get(key);
|
const value = await regionalRedisManager.get(key);
|
||||||
if (value !== null) {
|
if (value !== null) {
|
||||||
logger.debug(`[regional] Cache hit in Redis: ${key}`);
|
// logger.debug(`[regional] Cache hit in Redis: ${key}`);
|
||||||
return JSON.parse(value) as T;
|
return JSON.parse(value) as T;
|
||||||
}
|
}
|
||||||
logger.debug(`[regional] Cache miss in Redis: ${key}`);
|
// logger.debug(`[regional] Cache miss in Redis: ${key}`);
|
||||||
return undefined;
|
return undefined;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error(
|
logger.error(
|
||||||
@@ -385,7 +385,7 @@ class RegionalAdaptiveCache {
|
|||||||
const success = await regionalRedisManager.del(k);
|
const success = await regionalRedisManager.del(k);
|
||||||
if (success) {
|
if (success) {
|
||||||
deletedCount++;
|
deletedCount++;
|
||||||
logger.debug(`[regional] Deleted key from Redis: ${k}`);
|
// logger.debug(`[regional] Deleted key from Redis: ${k}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (deletedCount === keys.length) return deletedCount;
|
if (deletedCount === keys.length) return deletedCount;
|
||||||
@@ -400,7 +400,7 @@ class RegionalAdaptiveCache {
|
|||||||
const count = regionalLocalCache.del(k);
|
const count = regionalLocalCache.del(k);
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
deletedCount++;
|
deletedCount++;
|
||||||
logger.debug(`[regional] Deleted key from local cache: ${k}`);
|
// logger.debug(`[regional] Deleted key from local cache: ${k}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return deletedCount;
|
return deletedCount;
|
||||||
|
|||||||
Reference in New Issue
Block a user