Renkai commented on a change in pull request #9323:
URL: https://github.com/apache/pulsar/pull/9323#discussion_r564456849
##########
File path:
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpReadEntry.java
##########
@@ -117,6 +115,7 @@ public void readEntriesFailed(ManagedLedgerException
exception, Object ctx) {
if (!(exception instanceof TooManyRequestsException)) {
log.warn("[{}][{}] read failed from ledger at position:{} :
{}", cursor.ledger.getName(),
cursor.getName(), readPosition,
exception.getMessage());
+ log.warn("error caused by: ", exception.getCause());
Review comment:
@sijie
The slf4j API with `Throwable` only support one message string and one
throwable parameter, but we still have other info to print.
https://github.com/qos-ch/slf4j/blob/master/slf4j-api/src/main/java/org/slf4j/Logger.java#L602
By the way, the logger supports some advanced features like fold stacktrace
when printing too frequently, so we'd better not format stacktrace ourselves.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]