@@ -150,14 +150,14 @@ class Apigw {
150150 } )
151151 if ( detail && detail . apiId ) {
152152 exist = true
153- console . debug ( `Updating api with api id ${ endpoint . apiId } .` )
153+ console . log ( `Updating api with api id ${ endpoint . apiId } .` )
154154 await this . request ( {
155155 Action : 'ModifyApi' ,
156156 apiId : endpoint . apiId ,
157157 ...apiInputs
158158 } )
159159 output . apiId = endpoint . apiId
160- console . debug ( `Service with id ${ output . apiId } updated.` )
160+ console . log ( `Service with id ${ output . apiId } updated.` )
161161 }
162162 } catch ( e ) { }
163163 }
@@ -168,7 +168,7 @@ class Apigw {
168168 } )
169169 output . apiId = apiId
170170 output . created = true
171- console . debug ( `API with id ${ output . apiId } created.` )
171+ console . log ( `API with id ${ output . apiId } created.` )
172172 }
173173
174174 const { internalDomain } = await this . request ( {
@@ -188,13 +188,13 @@ class Apigw {
188188 }
189189
190190 if ( secretIds . length === 0 ) {
191- console . debug ( `Creating a new Secret key.` )
191+ console . log ( `Creating a new Secret key.` )
192192 const { secretId, secretKey } = await this . request ( {
193193 Action : 'CreateApiKey' ,
194194 secretName : secretName ,
195195 type : 'auto'
196196 } )
197- console . debug ( `Secret key with ID ${ secretId } and key ${ secretKey } updated.` )
197+ console . log ( `Secret key with ID ${ secretId } and key ${ secretKey } updated.` )
198198 secretIdsOutput . secretIds = [ secretId ]
199199 secretIdsOutput . created = true
200200 } else {
@@ -219,14 +219,14 @@ class Apigw {
219219 found = true
220220 } else {
221221 disable = true
222- console . debug ( `There is a disabled secret key: ${ secretId } , cannot be bound` )
222+ console . log ( `There is a disabled secret key: ${ secretId } , cannot be bound` )
223223 }
224224 break
225225 }
226226 }
227227 if ( ! found ) {
228228 if ( ! disable ) {
229- console . debug ( `Secret key id ${ secretId } does't exist` )
229+ console . log ( `Secret key id ${ secretId } does't exist` )
230230 }
231231 } else {
232232 ids . push ( secretId )
@@ -258,9 +258,9 @@ class Apigw {
258258 } )
259259 usagePlanOutput . id = createUsagePlan . usagePlanId
260260 usagePlanOutput . created = true
261- console . debug ( `Usage plan with ID ${ usagePlanOutput . id } created.` )
261+ console . log ( `Usage plan with ID ${ usagePlanOutput . id } created.` )
262262 } else {
263- console . debug ( `Updating usage plan with id ${ usagePlan . usagePlanId } .` )
263+ console . log ( `Updating usage plan with id ${ usagePlan . usagePlanId } .` )
264264 await this . request ( {
265265 Action : 'ModifyUsagePlan' ,
266266 usagePlanId : usagePlanOutput . id ,
@@ -320,7 +320,7 @@ class Apigw {
320320 for ( let j = 0 ; j < stateDomains . length ; j ++ ) {
321321 // only list subDomain and created in state
322322 if ( stateDomains [ j ] . subDomain === domainItem . domainName ) {
323- console . debug (
323+ console . log (
324324 `Start unbind previus domain ${ domainItem . domainName } for service ${ serviceId } `
325325 )
326326 await this . request ( {
@@ -335,7 +335,7 @@ class Apigw {
335335 // 2. bind user config domain
336336 const customDomainOutput = [ ]
337337 if ( customDomains && customDomains . length > 0 ) {
338- console . debug ( `Start bind custom domain for service ${ serviceId } ` )
338+ console . log ( `Start bind custom domain for service ${ serviceId } ` )
339339 for ( let i = 0 ; i < customDomains . length ; i ++ ) {
340340 const domainItem = customDomains [ i ]
341341 const domainProtocol = domainItem . protocols
@@ -358,8 +358,8 @@ class Apigw {
358358 subDomain : domainItem . domain ,
359359 cname : subDomain
360360 } )
361- console . debug ( `Custom domain for service ${ serviceId } created successfullly.` )
362- console . debug ( `Please add CNAME record ${ subDomain } for ${ domainItem . domain } .` )
361+ console . log ( `Custom domain for service ${ serviceId } created successfullly.` )
362+ console . log ( `Please add CNAME record ${ subDomain } for ${ domainItem . domain } .` )
363363 }
364364 }
365365
@@ -383,11 +383,11 @@ class Apigw {
383383
384384 const oldUsagePlan = usagePlanList . find ( ( item ) => item . usagePlanId === usagePlan . id )
385385 if ( oldUsagePlan ) {
386- console . debug (
386+ console . log (
387387 `Usage plan with id ${ usagePlan . id } already bind to api id ${ apiId } path ${ endpoint . method } ${ endpoint . path } .`
388388 )
389389 } else {
390- console . debug (
390+ console . log (
391391 `Binding usage plan with id ${ usagePlan . id } to api id ${ apiId } path ${ endpoint . method } ${ endpoint . path } .`
392392 )
393393 await this . request ( {
@@ -398,7 +398,7 @@ class Apigw {
398398 usagePlanIds : [ usagePlan . id ] ,
399399 apiIds : [ apiId ]
400400 } )
401- console . debug ( 'Binding successed.' )
401+ console . log ( 'Binding successed.' )
402402 }
403403 }
404404
@@ -455,15 +455,15 @@ class Apigw {
455455 secretIds : secrets . secretIds
456456 } )
457457 if ( unboundSecretIds . length > 0 ) {
458- console . debug (
458+ console . log (
459459 `Binding secret key ${ unboundSecretIds } to usage plan with id ${ usagePlan . id } .`
460460 )
461461 await this . request ( {
462462 Action : 'BindSecretIds' ,
463463 usagePlanId : usagePlan . id ,
464464 secretIds : unboundSecretIds
465465 } )
466- console . debug ( 'Binding secret key successed.' )
466+ console . log ( 'Binding secret key successed.' )
467467 }
468468 // store in api list
469469 curApi . usagePlan . secrets = secrets
@@ -480,12 +480,12 @@ class Apigw {
480480 }
481481
482482 apiList . push ( curApi )
483- console . debug (
483+ console . log (
484484 `Deployment successful for the api named ${ endpoint . apiName } in the ${ this . region } region.`
485485 )
486486 }
487487
488- console . debug ( `Deploying service with id ${ serviceId } .` )
488+ console . log ( `Deploying service with id ${ serviceId } .` )
489489 await this . request ( {
490490 Action : 'ReleaseService' ,
491491 serviceId : serviceId ,
@@ -532,7 +532,7 @@ class Apigw {
532532 secretIds : secrets . secretIds ,
533533 usagePlanId : curApi . usagePlan . id
534534 } )
535- console . debug ( `Unbinding secret key to usage plan with ID ${ curApi . usagePlan . id } .` )
535+ console . log ( `Unbinding secret key to usage plan with ID ${ curApi . usagePlan . id } .` )
536536
537537 // delelet all created api key
538538 if ( curApi . usagePlan . secrets . created === true ) {
@@ -546,7 +546,7 @@ class Apigw {
546546 Action : 'DeleteApiKey' ,
547547 secretId
548548 } )
549- console . debug ( `Removing any previously deployed secret key. ${ secretId } ` )
549+ console . log ( `Removing any previously deployed secret key. ${ secretId } ` )
550550 }
551551 }
552552 }
@@ -560,13 +560,13 @@ class Apigw {
560560 bindType : curApi . bindType ,
561561 apiIds : [ curApi . apiId ]
562562 } )
563- console . debug (
563+ console . log (
564564 `Unbinding usage plan with ID ${ curApi . usagePlan . id } to service with ID ${ serviceId } .`
565565 )
566566
567567 // 1.3 delete created usage plan
568568 if ( curApi . usagePlan . created === true ) {
569- console . debug ( `Removing any previously deployed usage plan ids ${ curApi . usagePlan . id } ` )
569+ console . log ( `Removing any previously deployed usage plan ids ${ curApi . usagePlan . id } ` )
570570 await this . request ( {
571571 Action : 'DeleteUsagePlan' ,
572572 usagePlanId : curApi . usagePlan . id
@@ -576,7 +576,7 @@ class Apigw {
576576
577577 // 2. delete only apis created by serverless framework
578578 if ( curApi . apiId && curApi . created === true ) {
579- console . debug ( `Removing api: ${ curApi . apiId } ` )
579+ console . log ( `Removing api: ${ curApi . apiId } ` )
580580 await this . request ( {
581581 Action : 'DeleteApi' ,
582582 apiId : curApi . apiId ,
@@ -590,7 +590,7 @@ class Apigw {
590590 for ( let i = 0 ; i < customDomains . length ; i ++ ) {
591591 const curDomain = customDomains [ i ]
592592 if ( curDomain . subDomain && curDomain . created === true ) {
593- console . debug ( `Unbinding custom domain: ${ curDomain . subDomain } ` )
593+ console . log ( `Unbinding custom domain: ${ curDomain . subDomain } ` )
594594 await this . request ( {
595595 Action : 'UnBindSubDomain' ,
596596 serviceId,
@@ -601,7 +601,7 @@ class Apigw {
601601 }
602602
603603 // 3. unrelease service
604- console . debug ( `Unreleasing service: ${ serviceId } , environment: ${ environment } ` )
604+ console . log ( `Unreleasing service: ${ serviceId } , environment: ${ environment } ` )
605605 await this . request ( {
606606 Action : 'UnReleaseService' ,
607607 serviceId,
@@ -611,7 +611,7 @@ class Apigw {
611611
612612 if ( created === true ) {
613613 // delete service
614- console . debug ( `Removing service: ${ serviceId } ` )
614+ console . log ( `Removing service: ${ serviceId } ` )
615615 await this . request ( {
616616 Action : 'DeleteService' ,
617617 serviceId
0 commit comments