Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
[PDS-119625] Log the Exception, not UnsafeArg.of(exceptionMessage) (#…
Browse files Browse the repository at this point in the history
…4822)

* Log exception, not Unsafe message

* Add generated changelog entries
  • Loading branch information
jeremyk-91 authored Jun 8, 2020
1 parent de6bdc1 commit c488c75
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public <V, K extends Exception> V runWithPooledResource(FunctionCheckedException
return runWithGoodResource(fn);
} catch (Throwable t) {
log.warn("Error occurred talking to host '{}': {}",
SafeArg.of("host", CassandraLogHelper.host(host)), UnsafeArg.of("exception", t.toString()));
SafeArg.of("host", CassandraLogHelper.host(host)), t);
if (t instanceof NoSuchElementException && t.getMessage().contains("Pool exhausted")) {
log.warn("Extra information about exhausted pool",
SafeArg.of("numActive", clientPool.getNumActive()),
Expand Down
8 changes: 8 additions & 0 deletions changelog/@unreleased/pr-4822.v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
type: fix
fix:
description: The type and stack trace of Exceptions when talking to Cassandra are
now logged (and in the case of Safe exceptions, the exception message will also
be available). Previously, only the exception message was logged, and this was
always Unsafe.
links:
- https://github.com/palantir/atlasdb/pull/4822

0 comments on commit c488c75

Please sign in to comment.