Skip to content

Commit 9b48446

Browse files
authored
Merge pull request #4111 from snyk/feat/snyk-iac-debug-log
chore: Add debug log for local bundle
2 parents 7533751 + 85bfd82 commit 9b48446

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/lib/iac/test/v2/local-cache/rules-bundle/download.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,14 @@ export async function downloadRulesBundle(
1919
// IAC_BUNDLE_PATH is a developer setting that is not useful to most users. It
2020
// is not a replacement for custom rules.
2121
if (config.IAC_BUNDLE_PATH) {
22+
debugLog(`Located a local rules bundle at ${testConfig.iacCachePath}`);
2223
return config.IAC_BUNDLE_PATH;
2324
}
2425

26+
debugLog(
27+
`Downloading the rules bundle and saving it at ${testConfig.iacCachePath}`,
28+
);
29+
2530
let downloadDurationSeconds = 0;
2631

2732
const timer = new TimerMetricInstance('iac_rules_bundle_download');
Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
1-
import * as createDebugLogger from 'debug';
2-
31
import { TestConfig } from '../../types';
42
import { downloadRulesBundle } from './download';
53

6-
const debugLogger = createDebugLogger('snyk-iac');
7-
84
export async function initRulesBundle(testConfig: TestConfig): Promise<string> {
95
// We are currently using the legacy rules bundle and we need to re-download it each time to use the latest one available.
106
// debugLogger('Looking for rules bundle locally');
117
// let rulesBundlePath = await lookupLocalRulesBundle(testConfig);
128

13-
debugLogger(
14-
`Downloading the rules bundle and saving it at ${testConfig.iacCachePath}`,
15-
);
169
return await downloadRulesBundle(testConfig);
1710
}

0 commit comments

Comments
 (0)