This is an automated email from the ASF dual-hosted git repository.
jshao 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 c47e845c2 [#6022] refactor: Output the failed logs to
`gravitino-server.log` file (#6043)
c47e845c2 is described below
commit c47e845c2f04c80fca4df6cc099a0cb3c37df0ef
Author: Wang Tao <[email protected]>
AuthorDate: Mon Dec 30 22:20:20 2024 +0800
[#6022] refactor: Output the failed logs to `gravitino-server.log` file
(#6043)
### What changes were proposed in this pull request?
move `server.initialize()` to try-catch block, so we can get the
exception and output the exception to log file
### Why are the changes needed?
Fix: #6022
### Does this PR introduce _any_ user-facing change?
NO
### How was this patch tested?
---
server/src/main/java/org/apache/gravitino/server/GravitinoServer.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/server/src/main/java/org/apache/gravitino/server/GravitinoServer.java
b/server/src/main/java/org/apache/gravitino/server/GravitinoServer.java
index 2afc65482..0c730439b 100644
--- a/server/src/main/java/org/apache/gravitino/server/GravitinoServer.java
+++ b/server/src/main/java/org/apache/gravitino/server/GravitinoServer.java
@@ -168,9 +168,9 @@ public class GravitinoServer extends ResourceConfig {
String confPath = System.getenv("GRAVITINO_TEST") == null ? "" : args[0];
ServerConfig serverConfig = loadConfig(confPath);
GravitinoServer server = new GravitinoServer(serverConfig,
GravitinoEnv.getInstance());
- server.initialize();
try {
+ server.initialize();
// Instantiates GravitinoServer
server.start();
} catch (Exception e) {