Skip to content

Commit 70b6101

Browse files
authored
perf: add inline debug logs (#8017)
## Problem the debug string is missed somehow and not being logged ``` let msg = indent( `codewhisperer: request-id: ${requestId}, timestamp(epoch): ${Date.now()}, timezone: ${timezone}, datetime: ${new Date().toLocaleString([], { timeZone: timezone })}, vscode version: '${vscode.version}', extension version: '${extensionVersion}', filename: '${EditorContext.getFileName(editor)}', left context of line: '${session.leftContextOfCurrentLine}', line number: ${session.startPos.line}, character location: ${session.startPos.character}, latency: ${latency} ms. Recommendations:`, 4, true ).trimStart() ``` ## Solution --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 8db9cf5 commit 70b6101

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/src/codewhisperer/service/recommendationHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ export class RecommendationHandler {
335335
msg += `\n ${index.toString().padStart(2, '0')}: ${indent(item.content, 8, true).trim()}`
336336
session.requestIdList.push(requestId)
337337
}
338-
getLogger('nextEditPrediction').debug(`codeWhisper request ${requestId}`)
338+
getLogger().debug(msg)
339339
if (invocationResult === 'Succeeded') {
340340
CodeWhispererCodeCoverageTracker.getTracker(session.language)?.incrementServiceInvocationCount()
341341
UserWrittenCodeTracker.instance.onQFeatureInvoked()

0 commit comments

Comments
 (0)