pivotal-jbarrett commented on code in PR #7584:
URL: https://github.com/apache/geode/pull/7584#discussion_r850530871


##########
geode-core/src/main/java/org/apache/geode/internal/cache/execute/ServerToClientFunctionResultSender.java:
##########
@@ -321,16 +325,8 @@ public synchronized void setException(Throwable exception) 
{
           }
           String exceptionMessage = exception.getMessage() != null ? 
exception.getMessage()
               : "Exception occurred during function execution";
-          if (AbstractExecution.SUPPRESS_FUNCTION_EXCEPTION_LOGGING
-              && exception instanceof FunctionException) {
-            if (logger.isDebugEnabled()) {
-              logger.debug(String.format("Exception on server while executing 
function : %s",
-                  fn), exception);
-            }
-          } else {
-            logger.warn(String.format("Exception on server while executing 
function : %s",
-                fn), exception);
-          }
+          logger.warn(exception instanceof FunctionException ? 
FUNCTION_EXCEPTION_MARKER : null,
+              String.format("Exception on server while executing function : 
%s", fn), exception);

Review Comment:
   Replace the `String.format()` with the logger format.



##########
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteRegionFunction66.java:
##########
@@ -220,17 +220,10 @@ public void cmdExecute(final @NotNull Message 
clientMessage,
         resultSender.setException(fe);
       } else {
         if (setLastResultReceived(resultSender)) {
-          if (AbstractExecution.SUPPRESS_FUNCTION_EXCEPTION_LOGGING) {
-            if (logger.isDebugEnabled()) {
-              logger.debug(String.format("Exception on server while executing 
function : %s",
+          logger.warn(FUNCTION_EXCEPTION_MARKER,
+              String.format("Exception on server while executing function : 
%s",

Review Comment:
   Another to convert to logger format.



##########
geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/functions/UserFunctionExecution.java:
##########
@@ -247,14 +251,7 @@ public void execute(FunctionContext<Object[]> context) {
                   
CliStrings.EXECUTE_FUNCTION__MSG__RESULT_COLLECTOR_0_NOT_FOUND_ERROR_1,
                   resultCollectorName, e.getMessage())));
     } catch (FunctionException e) {
-      if (AbstractExecution.SUPPRESS_FUNCTION_EXCEPTION_LOGGING) {
-        if (logger.isDebugEnabled()) {
-          logger.debug("error executing function " + functionId, e);
-        }
-      } else {
-        logger.error("error executing function " + functionId, e);
-      }
-
+      logger.error(FUNCTION_EXCEPTION_MARKER, "error executing function " + 
functionId, e);

Review Comment:
   Another to convert to logger format.



-- 
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.

To unsubscribe, e-mail: notifications-unsubscr...@geode.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to