This is an automated email from the ASF dual-hosted git repository.
jmclean pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push:
new 6929bd31f4 [#7247] refactor(authorization): Formatted error logger in
authorization ranger client extension and include stacktrace (#7257)
6929bd31f4 is described below
commit 6929bd31f419e5e1c10c36416f8715e2b8113bfa
Author: Praveen <[email protected]>
AuthorDate: Tue May 27 11:02:50 2025 +0530
[#7247] refactor(authorization): Formatted error logger in authorization
ranger client extension and include stacktrace (#7257)
### What changes were proposed in this pull request?
1: Use the syntax to log message in log.error
2: Log stacktrace with message
### Why are the changes needed?
Fix: https://github.com/apache/gravitino/issues/7247
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Logger not tested, assuming basic log.error syntax
---
.../apache/gravitino/authorization/ranger/RangerClientExtension.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/RangerClientExtension.java
b/authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/RangerClientExtension.java
index e1e9f6955d..723c5549dd 100644
---
a/authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/RangerClientExtension.java
+++
b/authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/RangerClientExtension.java
@@ -119,7 +119,7 @@ public class RangerClientExtension extends RangerClient {
try {
callAPIMethodClassResponseType.invoke(this, CREATE_EXTERNAL_USER, null,
user, VXUser.class);
} catch (UniformInterfaceException e) {
- LOG.error("Failed to create user: " +
e.getResponse().getEntity(String.class));
+ LOG.error("Failed to create user: {}",
e.getResponse().getEntity(String.class), e);
return Boolean.FALSE;
} catch (InvocationTargetException | IllegalAccessException e) {
Throwable cause = e.getCause();
@@ -169,7 +169,7 @@ public class RangerClientExtension extends RangerClient {
try {
callAPIMethodClassResponseType.invoke(this, CREATE_GROUP, null, group,
VXGroup.class);
} catch (UniformInterfaceException e) {
- LOG.error("Failed to create user: " +
e.getResponse().getEntity(String.class));
+ LOG.error("Failed to create group: {}",
e.getResponse().getEntity(String.class), e);
return Boolean.FALSE;
} catch (InvocationTargetException | IllegalAccessException e) {
throw new RuntimeException(e);