You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by ga...@apache.org on 2022/01/14 04:44:28 UTC

[incubator-seatunnel] branch dev updated: [SeaTunnel #998] add an environment variable to control print AsciiLogo (#1000)

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

gaoyingju pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git


The following commit(s) were added to refs/heads/dev by this push:
     new ed95bb4  [SeaTunnel #998] add an environment variable to control print AsciiLogo (#1000)
ed95bb4 is described below

commit ed95bb4f58568981b21e1b5baa0a914bae26998c
Author: CenterCode <yx...@users.noreply.github.com>
AuthorDate: Fri Jan 14 12:44:21 2022 +0800

    [SeaTunnel #998] add an environment variable to control print AsciiLogo (#1000)
---
 config/seatunnel-env.sh                                              | 5 ++++-
 .../src/main/java/org/apache/seatunnel/Seatunnel.java                | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/config/seatunnel-env.sh b/config/seatunnel-env.sh
index 86ecce5..462c777 100644
--- a/config/seatunnel-env.sh
+++ b/config/seatunnel-env.sh
@@ -19,4 +19,7 @@
 # Home directory of spark distribution.
 SPARK_HOME=${SPARK_HOME:-/opt/spark}
 # Home directory of flink distribution.
-FLINK_HOME=${FLINK_HOME:-/opt/flink}
\ No newline at end of file
+FLINK_HOME=${FLINK_HOME:-/opt/flink}
+
+# Control whether to print the ascii logo
+export SEATUNNEL_PRINT_ASCII_LOGO=true
\ No newline at end of file
diff --git a/seatunnel-core/seatunnel-core-base/src/main/java/org/apache/seatunnel/Seatunnel.java b/seatunnel-core/seatunnel-core-base/src/main/java/org/apache/seatunnel/Seatunnel.java
index 8981748..16b2cd0 100644
--- a/seatunnel-core/seatunnel-core-base/src/main/java/org/apache/seatunnel/Seatunnel.java
+++ b/seatunnel-core/seatunnel-core-base/src/main/java/org/apache/seatunnel/Seatunnel.java
@@ -156,7 +156,10 @@ public class Seatunnel {
     }
 
     private static void showAsciiLogo() {
-        AsciiArtUtils.printAsciiArt("SeaTunnel");
+        String printAsciiLogo = System.getenv("SEATUNNEL_PRINT_ASCII_LOGO");
+        if ("true".equalsIgnoreCase(printAsciiLogo)) {
+            AsciiArtUtils.printAsciiArt(printAsciiLogo);
+        }
     }
 
     private static void showConfigError(Throwable throwable) {