Skip to content

Commit 5893690

Browse files
committed
more logs
1 parent aa43acb commit 5893690

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

packages/amazonq/test/e2e/amazonq/review.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ describe('Amazon Q Code Review', function () {
310310
: undefined
311311
},
312312
{
313-
timeout: CodeWhispererConstants.codeFixJobTimeoutMs,
313+
timeout: CodeWhispererConstants.codeFixJobTimeoutMs + 20_000,
314314
interval: CodeWhispererConstants.codeFixJobPollingIntervalMs,
315315
truthy: true,
316316
}

packages/core/src/codewhisperer/commands/startCodeFixGeneration.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55
import { fs } from '../../shared/fs/fs'
6-
import { getLogger } from '../../shared/logger/logger'
6+
// import { getLogger } from '../../shared/logger/logger'
77
import {
88
createCodeFixJob,
99
getCodeFixJob,
@@ -21,6 +21,7 @@ import { tempDirPath } from '../../shared/filesystemUtilities'
2121
import { CodeWhispererSettings } from '../util/codewhispererSettings'
2222
import { AuthUtil } from '../util/authUtil'
2323
import { saveDocumentIfDirty } from '../../shared/utilities/textDocumentUtilities'
24+
/* eslint-disable aws-toolkits/no-console-log */
2425

2526
export async function startCodeFixGeneration(
2627
client: DefaultCodeWhispererClient,
@@ -37,7 +38,7 @@ export async function startCodeFixGeneration(
3738
let linesOfFixGenerated
3839
let charsOfFixGenerated
3940
try {
40-
getLogger().verbose(
41+
console.log(
4142
`Starting code fix generation for lines ${issue.startLine + 1} through ${issue.endLine} of file ${filePath}`
4243
)
4344

@@ -90,30 +91,30 @@ export async function startCodeFixGeneration(
9091
}
9192
jobId = codeFixJob.jobId
9293
issue.fixJobId = codeFixJob.jobId
93-
getLogger().verbose(`Created code fix job.`)
94+
console.log(`Created code fix job.`)
9495

9596
/**
9697
* Step 4: Polling mechanism on code fix job status
9798
*/
9899
throwIfCancelled()
99100
const jobStatus = await pollCodeFixJobStatus(client, String(codeFixJob.jobId), profile)
100101
if (jobStatus === 'Failed') {
101-
getLogger().verbose(`Code fix generation failed.`)
102+
console.log(`Code fix generation failed.`)
102103
throw new CreateCodeFixError()
103104
}
104105

105106
/**
106107
* Step 5: Process and render code fix results
107108
*/
108109
throwIfCancelled()
109-
getLogger().verbose(`Code fix job succeeded and start processing result.`)
110+
console.log(`Code fix job succeeded and start processing result.`)
110111

111112
const { suggestedFix } = await getCodeFixJob(client, String(codeFixJob.jobId), profile)
112113
// eslint-disable-next-line aws-toolkits/no-json-stringify-in-log
113-
getLogger().verbose(`Suggested fix: ${JSON.stringify(suggestedFix)}`)
114+
console.log(`Suggested fix: ${JSON.stringify(suggestedFix)}`)
114115
return { suggestedFix, jobId }
115116
} catch (err) {
116-
getLogger().error('Code fix generation failed: %s', err)
117+
console.log('Code fix generation failed: %s', err)
117118
throw err
118119
} finally {
119120
codeFixState.setToNotStarted()

0 commit comments

Comments
 (0)