You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@helix.apache.org by GitBox <gi...@apache.org> on 2019/07/22 21:56:54 UTC

[GitHub] [helix] narendly commented on issue #352: Don't log and throw: removing redundant logs right before throwing exception

narendly commented on issue #352: Don't log and throw: removing redundant logs right before throwing exception
URL: https://github.com/apache/helix/issues/352#issuecomment-513970542
 
 
   It makes sense not to double-log things in the log and the exception. If we want to make this change, however, let us consider the following:
   
   1. Make sure other Helix APIs (such as REST apis) would be okay with this behavior.
   2. What implications would the behavior change have on other applications built on Helix? It is important that we keep things backward compatible. If a downstream service just swallows the exception, would the information be lost? Vice versa if we removed the exception.
   
   Hunter
   
   ⁣
   
   On Jul 22, 2019, 21:56, at 21:56, pkuwm <no...@github.com> wrote:
   >Same log message should not be logged right while an exception is also
   >thrown. Ex.:
   >https://github.com/apache/helix/blob/3e670ded2ece50e21b76fcab7fed7cb61a24eea1/helix-core/src/main/java/org/apache/helix/task/TaskDriver.java#L337
   >
   >The principal "don't log and throw" would be a nice practice for
   >handling exceptions in Java. We would like to keep the logs clean and
   >helpful without redundancy. An exception message is enough to describe
   >the exceptional event. And the stack trace tells you in which class,
   >method, and line the exception was thrown.
   >
   >
   >
   >-- 
   >You are receiving this because you are subscribed to this thread.
   >Reply to this email directly or view it on GitHub:
   >https://github.com/apache/helix/issues/352
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services