Skip to content

Commit 054d5a4

Browse files
author
David Hasani
committed
improve logging
1 parent 1ec3f1a commit 054d5a4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/core/src/codewhisperer/service/transformByQ/transformApiHandler.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ export async function startJob(uploadId: string) {
447447
target: { language: targetLanguageVersion }, // always JDK17
448448
},
449449
})
450+
getLogger().info('CodeTransformation: called startJob API successfully')
450451
if (response.$response.requestId) {
451452
transformByQState.setJobFailureMetadata(` (request ID: ${response.$response.requestId})`)
452453
}
@@ -670,6 +671,7 @@ export async function pollTransformationJob(jobId: string, validStates: string[]
670671
})
671672
}
672673
transformByQState.setPolledJobStatus(status)
674+
getLogger().info('CodeTransformation: polled job status =', status)
673675

674676
const errorMessage = response.transformationJob.reason
675677
if (errorMessage !== undefined) {

packages/core/src/codewhisperer/service/transformByQ/transformationResultsViewProvider.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ export class DiffModel {
177177
}
178178

179179
const changedFiles = parsePatch(diffContents)
180+
getLogger().info('CodeTransformation: parsed patch file successfully')
180181
// path to the directory containing copy of the changed files in the transformed project
181182
const pathToTmpSrcDir = this.copyProject(pathToWorkspace, changedFiles)
182183
transformByQState.setProjectCopyFilePath(pathToTmpSrcDir)
@@ -401,6 +402,7 @@ export class ProposedTransformationExplorer {
401402
pathToArchive
402403
)
403404

405+
getLogger().info('CodeTransformation: downloaded results successfully')
404406
// Update downloaded artifact size
405407
exportResultsArchiveSize = (await fs.promises.stat(pathToArchive)).size
406408

@@ -532,6 +534,7 @@ export class ProposedTransformationExplorer {
532534

533535
vscode.commands.registerCommand('aws.amazonq.transformationHub.reviewChanges.acceptChanges', async () => {
534536
telemetry.codeTransform_submitSelection.run(() => {
537+
getLogger().info('CodeTransformation: accepted changes')
535538
diffModel.saveChanges()
536539
telemetry.record({
537540
codeTransformSessionId: CodeTransformTelemetryState.instance.getSessionId(),
@@ -585,6 +588,7 @@ export class ProposedTransformationExplorer {
585588

586589
vscode.commands.registerCommand('aws.amazonq.transformationHub.reviewChanges.rejectChanges', async () => {
587590
await telemetry.codeTransform_submitSelection.run(async () => {
591+
getLogger().info('CodeTransformation: rejected changes')
588592
diffModel.rejectChanges()
589593
await reset()
590594
telemetry.record({

0 commit comments

Comments
 (0)