Skip to content

Commit fa69340

Browse files
committed
[grid] log the complete exception
1 parent 11dd611 commit fa69340

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

java/src/org/openqa/selenium/grid/node/config/DriverServiceSessionFactory.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public void stop() {
213213
"Error while creating session with the driver service. "
214214
+ "Stopping driver service: "
215215
+ e.getMessage();
216-
LOG.warning(errorMessage);
216+
LOG.log(Level.WARNING, errorMessage, e);
217217

218218
attributeMap.put(AttributeKey.EXCEPTION_MESSAGE.getKey(), errorMessage);
219219
span.addEvent(AttributeKey.EXCEPTION_EVENT.getKey(), attributeMap);
@@ -226,12 +226,12 @@ public void stop() {
226226
EXCEPTION.accept(attributeMap, e);
227227
String errorMessage =
228228
"Error while creating session with the driver service. " + e.getMessage();
229-
LOG.warning(errorMessage);
229+
LOG.log(Level.WARNING, errorMessage, e);
230230

231231
attributeMap.put(AttributeKey.EXCEPTION_MESSAGE.getKey(), errorMessage);
232232
span.addEvent(AttributeKey.EXCEPTION_EVENT.getKey(), attributeMap);
233233

234-
return Either.left(new SessionNotCreatedException(e.getMessage()));
234+
return Either.left(new SessionNotCreatedException(errorMessage));
235235
} finally {
236236
span.close();
237237
}

0 commit comments

Comments
 (0)