33 * SPDX-License-Identifier: Apache-2.0
44 */
55import { fs } from '../../shared/fs/fs'
6- import { getLogger } from '../../shared/logger/logger'
6+ // import { getLogger } from '../../shared/logger/logger'
77import {
88 createCodeFixJob ,
99 getCodeFixJob ,
@@ -21,6 +21,7 @@ import { tempDirPath } from '../../shared/filesystemUtilities'
2121import { CodeWhispererSettings } from '../util/codewhispererSettings'
2222import { AuthUtil } from '../util/authUtil'
2323import { saveDocumentIfDirty } from '../../shared/utilities/textDocumentUtilities'
24+ /* eslint-disable aws-toolkits/no-console-log */
2425
2526export 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