This is an automated email from the ASF dual-hosted git repository.

technoboy pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/branch-3.2 by this push:
     new 846e675df34 [improve][fn] Add missing "exception" argument to some 
`log.error` (#22140)
846e675df34 is described below

commit 846e675df341eb13ecdfd4d4f3d2fea6798cefd9
Author: jiangpengcheng <scjiangpengch...@gmail.com>
AuthorDate: Thu Feb 29 10:11:09 2024 +0800

    [improve][fn] Add missing "exception" argument to some `log.error` (#22140)
---
 .../java/org/apache/pulsar/functions/worker/PulsarWorkerService.java  | 2 +-
 .../org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java    | 4 ++--
 .../org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java    | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/PulsarWorkerService.java
 
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/PulsarWorkerService.java
index cb4188efd07..beb3c6c28f4 100644
--- 
a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/PulsarWorkerService.java
+++ 
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/PulsarWorkerService.java
@@ -222,7 +222,7 @@ public class PulsarWorkerService implements WorkerService {
                 log.warn("Retry to connect to Pulsar service at {}", 
workerConfig.getPulsarWebServiceUrl());
                 if (retries >= maxRetries) {
                     log.error("Failed to connect to Pulsar service at {} after 
{} attempts",
-                            workerConfig.getPulsarFunctionsNamespace(), 
maxRetries);
+                            workerConfig.getPulsarFunctionsNamespace(), 
maxRetries, e);
                     throw e;
                 }
                 retries++;
diff --git 
a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java
 
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java
index 41b4c52c581..2614ee90884 100644
--- 
a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java
+++ 
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java
@@ -482,7 +482,7 @@ public abstract class ComponentImpl implements 
Component<PulsarWorkerService> {
             try {
                 worker().getStateStoreProvider().cleanUp(tenant, namespace, 
componentName);
             } catch (Throwable e) {
-                log.error("failed to clean up the state store for {}/{}/{}", 
tenant, namespace, componentName);
+                log.error("failed to clean up the state store for {}/{}/{}", 
tenant, namespace, componentName, e);
             }
         }
     }
@@ -1055,7 +1055,7 @@ public abstract class ComponentImpl implements 
Component<PulsarWorkerService> {
         try {
             
worker().getBrokerAdmin().topics().getSubscriptions(inputTopicToWrite);
         } catch (PulsarAdminException e) {
-            log.error("Function in trigger function is not ready @ /{}/{}/{}", 
tenant, namespace, functionName);
+            log.error("Function in trigger function is not ready @ /{}/{}/{}", 
tenant, namespace, functionName, e);
             throw new RestException(Status.BAD_REQUEST, "Function in trigger 
function is not ready");
         }
         String outputTopic = 
functionMetaData.getFunctionDetails().getSink().getTopic();
diff --git 
a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java
 
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java
index 6b81d2c4918..a4514e7390a 100644
--- 
a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java
+++ 
b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java
@@ -169,7 +169,7 @@ public class FunctionsImpl extends ComponentImpl implements 
Functions<PulsarWork
                 
worker().getFunctionRuntimeManager().getRuntimeFactory().doAdmissionChecks(functionDetails);
             } catch (Exception e) {
                 log.error("{} {}/{}/{} cannot be admitted by the runtime 
factory",
-                        ComponentTypeUtils.toString(componentType), tenant, 
namespace, functionName);
+                        ComponentTypeUtils.toString(componentType), tenant, 
namespace, functionName, e);
                 throw new RestException(Response.Status.BAD_REQUEST, 
String.format("%s %s cannot be admitted:- %s",
                         ComponentTypeUtils.toString(componentType), 
functionName, e.getMessage()));
             }
@@ -326,7 +326,7 @@ public class FunctionsImpl extends ComponentImpl implements 
Functions<PulsarWork
                 
worker().getFunctionRuntimeManager().getRuntimeFactory().doAdmissionChecks(functionDetails);
             } catch (Exception e) {
                 log.error("Updated {} {}/{}/{} cannot be submitted to runtime 
factory",
-                        ComponentTypeUtils.toString(componentType), tenant, 
namespace, functionName);
+                        ComponentTypeUtils.toString(componentType), tenant, 
namespace, functionName, e);
                 throw new RestException(Response.Status.BAD_REQUEST, 
String.format("%s %s cannot be admitted:- %s",
                         ComponentTypeUtils.toString(componentType), 
functionName, e.getMessage()));
             }

Reply via email to