[GitHub] [pulsar] liketic commented on a change in pull request #5364: [broker] Fix incorrect log format
liketic commented on a change in pull request #5364: [broker] Fix incorrect log format URL: https://github.com/apache/pulsar/pull/5364#discussion_r338480135 ## File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokerStatsBase.java ## @@ -167,7 +167,7 @@ public LoadManagerReport getLoadReport() throws Exception { throw new RestException(Status.CONFLICT, lm.getClass().getName() + " does not support this operation"); } } catch (Exception e) { -log.error("Unable to get Resource Availability - [{}]", e); +log.error("Unable to get Resource Availability", e); Review comment: OK. Then shall we change other logs to only print a exception message in this class ? Such as: https://github.com/apache/pulsar/blob/ad09efe26afa29cd3a87b90b15e7b722e2beb5c5/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokerStatsBase.java#L67 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] liketic commented on a change in pull request #5364: [broker] Fix incorrect log format
liketic commented on a change in pull request #5364: [broker] Fix incorrect log format URL: https://github.com/apache/pulsar/pull/5364#discussion_r336778503 ## File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokerStatsBase.java ## @@ -167,7 +167,7 @@ public LoadManagerReport getLoadReport() throws Exception { throw new RestException(Status.CONFLICT, lm.getClass().getName() + " does not support this operation"); } } catch (Exception e) { -log.error("Unable to get Resource Availability - [{}]", e); +log.error("Unable to get Resource Availability", e); Review comment: Hi @merlimat , I found the other methods are also print stack trace in catch block. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] liketic commented on a change in pull request #5364: [broker] Fix incorrect log format
liketic commented on a change in pull request #5364: [broker] Fix incorrect log format URL: https://github.com/apache/pulsar/pull/5364#discussion_r334212266 ## File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokerStatsBase.java ## @@ -167,7 +167,7 @@ public LoadManagerReport getLoadReport() throws Exception { throw new RestException(Status.CONFLICT, lm.getClass().getName() + " does not support this operation"); } } catch (Exception e) { -log.error("Unable to get Resource Availability - [{}]", e); +log.error("Unable to get Resource Availability", e); Review comment: Thanks @merlimat . I guess it's should be ``` log.error("Unable to get Resource Availability - [{}]", e.getMessage()); ``` ? 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: us...@infra.apache.org With regards, Apache Git Services