Skip to content

Commit 3f1bc42

Browse files
committed
Make logging consistent in tests
1 parent 81719c5 commit 3f1bc42

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

msal4j-sdk/src/integrationtest/java/com.microsoft.aad.msal4j/AcquireTokenInteractiveIT.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
2929
class AcquireTokenInteractiveIT extends SeleniumTest {
30-
private final static Logger LOG = LoggerFactory.getLogger(AuthorizationCodeIT.class);
30+
private static final Logger LOG = LoggerFactory.getLogger(AcquireTokenInteractiveIT.class);
3131

3232
private Config cfg;
3333

@@ -145,7 +145,7 @@ void acquireTokenInteractive_Ciam() {
145145
result = pca.acquireToken(parameters).get();
146146

147147
} catch (Exception e) {
148-
LOG.error("Error acquiring token with authCode: " + e.getMessage());
148+
LOG.error("Error acquiring token with authCode: {}", e.getMessage());
149149
throw new RuntimeException("Error acquiring token with authCode: " + e.getMessage());
150150
}
151151

@@ -236,7 +236,7 @@ private IAuthenticationResult acquireTokenInteractive(
236236
result = pca.acquireToken(parameters).get();
237237

238238
} catch (Exception e) {
239-
LOG.error("Error acquiring token with authCode: " + e.getMessage());
239+
LOG.error("Error acquiring token with authCode: {}", e.getMessage());
240240
throw new RuntimeException("Error acquiring token with authCode: " + e.getMessage());
241241
}
242242
return result;
@@ -266,7 +266,7 @@ private IAuthenticationResult acquireTokenInteractive_instanceAware(
266266
result = pca.acquireToken(parameters).get();
267267

268268
} catch (Exception e) {
269-
LOG.error("Error acquiring token with authCode: " + e.getMessage());
269+
LOG.error("Error acquiring token with authCode: {}", e.getMessage());
270270
throw new RuntimeException("Error acquiring token with authCode: " + e.getMessage());
271271
}
272272
return result;

msal4j-sdk/src/integrationtest/java/com.microsoft.aad.msal4j/AuthorizationCodeIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
3030
class AuthorizationCodeIT extends SeleniumTest {
31-
private final static Logger LOG = LoggerFactory.getLogger(AuthorizationCodeIT.class);
31+
private static final Logger LOG = LoggerFactory.getLogger(AuthorizationCodeIT.class);
3232

3333
private Config cfg;
3434

@@ -202,7 +202,7 @@ private IAuthenticationResult acquireTokenAuthorizationCodeFlow(
202202
.get();
203203

204204
} catch (Exception e) {
205-
LOG.error("Error acquiring token with authCode: " + e.getMessage());
205+
LOG.error("Error acquiring token with authCode: {}", e.getMessage());
206206
throw new RuntimeException("Error acquiring token with authCode: " + e.getMessage());
207207
}
208208
return result;
@@ -219,7 +219,7 @@ private IAuthenticationResult acquireTokenInteractiveB2C(ConfidentialClientAppli
219219
.build())
220220
.get();
221221
} catch (Exception e) {
222-
LOG.error("Error acquiring token with authCode: " + e.getMessage());
222+
LOG.error("Error acquiring token with authCode: {}", e.getMessage());
223223
throw new RuntimeException("Error acquiring token with authCode: " + e.getMessage());
224224
}
225225
return result;

msal4j-sdk/src/integrationtest/java/com.microsoft.aad.msal4j/DeviceCodeIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
2525
class DeviceCodeIT {
26-
private final static Logger LOG = LoggerFactory.getLogger(DeviceCodeIT.class);
26+
private static final Logger LOG = LoggerFactory.getLogger(DeviceCodeIT.class);
2727

2828
private LabUserProvider labUserProvider;
2929
private WebDriver seleniumDriver;
@@ -152,7 +152,7 @@ private void runAutomatedDeviceCodeFlow(DeviceCode deviceCode, User user) {
152152
if (!isRunningLocally) {
153153
SeleniumExtensions.takeScreenShot(seleniumDriver);
154154
}
155-
LOG.error("Browser automation failed: " + e.getMessage());
155+
LOG.error("Browser automation failed: {}", e.getMessage());
156156
throw new RuntimeException("Browser automation failed: " + e.getMessage());
157157
}
158158
}

0 commit comments

Comments
 (0)