@@ -22,17 +22,16 @@ import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
2222import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
2323import com.fasterxml.jackson.module.kotlin.readValue
2424import software.aws.toolkits.core.utils.createParentDirectories
25- import software.aws.toolkits.core.utils.debug
2625import software.aws.toolkits.core.utils.deleteIfExists
2726import software.aws.toolkits.core.utils.getLogger
27+ import software.aws.toolkits.core.utils.info
2828import software.aws.toolkits.core.utils.inputStreamIfExists
2929import software.aws.toolkits.core.utils.outputStream
3030import software.aws.toolkits.core.utils.toHexString
3131import software.aws.toolkits.core.utils.touch
3232import software.aws.toolkits.core.utils.tryDirOp
3333import software.aws.toolkits.core.utils.tryFileOp
3434import software.aws.toolkits.core.utils.tryOrNull
35- import software.aws.toolkits.core.utils.warn
3635import software.aws.toolkits.telemetry.AuthTelemetry
3736import software.aws.toolkits.telemetry.Result
3837import java.io.InputStream
@@ -97,16 +96,16 @@ class DiskCache(
9796 }
9897
9998 override fun invalidateClientRegistration (ssoRegion : String ) {
100- LOG .debug { " invalidateClientRegistration for $ssoRegion " }
99+ LOG .info { " invalidateClientRegistration for $ssoRegion " }
101100 clientRegistrationCache(ssoRegion).tryDeleteIfExists()
102101 }
103102
104103 override fun loadClientRegistration (cacheKey : ClientRegistrationCacheKey ): ClientRegistration ? {
105- LOG .debug { " loadClientRegistration for $cacheKey " }
104+ LOG .info { " loadClientRegistration for $cacheKey " }
106105 val inputStream = clientRegistrationCache(cacheKey).tryInputStreamIfExists()
107106 if (inputStream == null ) {
108107 val stage = LoadCredentialStage .ACCESS_FILE
109- LOG .warn { " Failed to load Client Registration: cache file does not exist" }
108+ LOG .info { " Failed to load Client Registration: cache file does not exist" }
110109 AuthTelemetry .modifyConnection(
111110 action = " Load cache file" ,
112111 source = " loadClientRegistration" ,
@@ -120,15 +119,15 @@ class DiskCache(
120119 }
121120
122121 override fun saveClientRegistration (cacheKey : ClientRegistrationCacheKey , registration : ClientRegistration ) {
123- LOG .debug { " saveClientRegistration for $cacheKey " }
122+ LOG .info { " saveClientRegistration for $cacheKey " }
124123 val registrationCache = clientRegistrationCache(cacheKey)
125124 writeKey(registrationCache) {
126125 objectMapper.writeValue(it, registration)
127126 }
128127 }
129128
130129 override fun invalidateClientRegistration (cacheKey : ClientRegistrationCacheKey ) {
131- LOG .debug { " invalidateClientRegistration for $cacheKey " }
130+ LOG .info { " invalidateClientRegistration for $cacheKey " }
132131 try {
133132 clientRegistrationCache(cacheKey).tryDeleteIfExists()
134133 } catch (e: Exception ) {
@@ -144,7 +143,7 @@ class DiskCache(
144143 }
145144
146145 override fun invalidateAccessToken (ssoUrl : String ) {
147- LOG .debug { " invalidateAccessToken for $ssoUrl " }
146+ LOG .info { " invalidateAccessToken for $ssoUrl " }
148147 try {
149148 accessTokenCache(ssoUrl).tryDeleteIfExists()
150149 } catch (e: Exception ) {
@@ -160,7 +159,7 @@ class DiskCache(
160159 }
161160
162161 override fun loadAccessToken (cacheKey : AccessTokenCacheKey ): AccessToken ? {
163- LOG .debug { " loadAccessToken for $cacheKey " }
162+ LOG .info { " loadAccessToken for $cacheKey " }
164163 val cacheFile = accessTokenCache(cacheKey)
165164 val inputStream = cacheFile.tryInputStreamIfExists() ? : return null
166165
@@ -170,15 +169,15 @@ class DiskCache(
170169 }
171170
172171 override fun saveAccessToken (cacheKey : AccessTokenCacheKey , accessToken : AccessToken ) {
173- LOG .debug { " saveAccessToken for $cacheKey " }
172+ LOG .info { " saveAccessToken for $cacheKey " }
174173 val accessTokenCache = accessTokenCache(cacheKey)
175174 writeKey(accessTokenCache) {
176175 objectMapper.writeValue(it, accessToken)
177176 }
178177 }
179178
180179 override fun invalidateAccessToken (cacheKey : AccessTokenCacheKey ) {
181- LOG .debug { " invalidateAccessToken for $cacheKey " }
180+ LOG .info { " invalidateAccessToken for $cacheKey " }
182181 try {
183182 accessTokenCache(cacheKey).tryDeleteIfExists()
184183 } catch (e: Exception ) {
@@ -203,7 +202,7 @@ class DiskCache(
203202 val sha = sha1(cacheNameMapper.writeValueAsString(it))
204203
205204 cacheDir.resolve(" $sha .json" ).also {
206- LOG .debug { " $cacheKey resolves to $it " }
205+ LOG .info { " $cacheKey resolves to $it " }
207206 }
208207 }
209208
@@ -225,7 +224,7 @@ class DiskCache(
225224 if (clientRegistration.expiresAt.isNotExpired()) {
226225 return clientRegistration
227226 } else {
228- LOG .warn { " Client Registration is expired" }
227+ LOG .info { " Client Registration is expired" }
229228 AuthTelemetry .modifyConnection(
230229 action = " Validate Credentials" ,
231230 source = " loadClientRegistration" ,
@@ -236,7 +235,7 @@ class DiskCache(
236235 return null
237236 }
238237 } catch (e: Exception ) {
239- LOG .warn { " Client Registration could not be read" }
238+ LOG .info { " Client Registration could not be read" }
240239 AuthTelemetry .modifyConnection(
241240 action = " Validate Credentials" ,
242241 source = " loadClientRegistration" ,
@@ -269,7 +268,7 @@ class DiskCache(
269268 }
270269
271270 private fun writeKey (path : Path , consumer : (OutputStream ) -> Unit ) {
272- LOG .debug { " writing to $path " }
271+ LOG .info { " writing to $path " }
273272 try {
274273 path.tryDirOp(LOG ) { createParentDirectories() }
275274
0 commit comments