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

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


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

commit dc035f51ef0cc03f04e0c6d97ef2e41512b12717
Author: jiangpengcheng <[email protected]>
AuthorDate: Thu Mar 7 09:33:22 2024 +0800

    [improve][fn][branch-3.0] Add missing "exception" argument to some 
`log.error` (#22140) (#22213)
---
 .../java/org/apache/pulsar/functions/worker/PulsarWorkerService.java  | 2 +-
 .../org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java    | 2 +-
 .../org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java    | 4 ++--
 3 files changed, 4 insertions(+), 4 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 84b943e5671..255ed5f3218 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
@@ -224,7 +224,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 6d07e587091..ea5517e0fd4 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
@@ -1080,7 +1080,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 a075d3e18a0..4cbd7c8cbcb 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()));
             }
@@ -327,7 +327,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