디버그 로그 추가 (전략 로딩 진단용)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Macbook
2026-06-11 01:45:10 +09:00
parent 66143e5912
commit 0a2925ba0f
2 changed files with 3 additions and 0 deletions
@@ -161,6 +161,7 @@ export async function fetchLiveSnapshot(
} catch {
status = null;
}
console.debug('[fetchLiveSnapshot] market=%s sid=%d status=%s baseRows=%d', normalizedMarket, strategyId, status ? 'ok' : 'null', baseRows.length);
if (!status || !statusMatches(status, normalizedMarket, strategyId)) {
if (baseRows.length === 0) return null;
@@ -80,6 +80,7 @@ export async function resolveNotificationStrategy(
const normalizedId = normalizeStrategyId(strategyId);
// prefetched가 빈 배열이면 직접 API로 재시도 (백엔드 미준비 시 prefetch가 빈 채로 캐시될 수 있음)
const list = (prefetched != null && prefetched.length > 0) ? prefetched : await getStrategiesList();
console.debug('[resolveStrategy] id=%s name=%s listSize=%d', normalizedId, strategyName, list.length);
if (normalizedId != null) {
const fromList = list.find(s => s.id === normalizedId);
@@ -129,6 +130,7 @@ export async function resolveNotificationStrategy(
}
}
console.warn('[resolveStrategy] 전략 찾기 실패 id=%s name=%s market=%s listSize=%d', normalizedId, strategyName, market, list.length);
return { strategy: undefined, strategyId: normalizedId };
}