You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/10/08 15:24:40 UTC

[GitHub] [incubator-seatunnel] hailin0 opened a new pull request, #3025: [Feature][Log] Integration log4j2

hailin0 opened a new pull request, #3025:
URL: https://github.com/apache/incubator-seatunnel/pull/3025

   <!--
   
   Thank you for contributing to SeaTunnel! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/incubator-seatunnel/issues).
   
     - Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
   
     - Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
   
   -->
   
   ## Purpose of this pull request
   
   Maven dependencys:
   - Add slf4j & log4j2 provider & bridges into root pom.xml
   - Exclude others logging system provider in maven-sheade-plugin
   
   Hazelcast:
   - Enhanced logging management endpoint to dynamically change log4j2 level
   
   Seatunnel-starter:
   - Add `log4j2.component.properties` to use asynchronous logger
   - Add `log4j2.properties` output log to file
   - Add slf4j、log4j2 package into shade jar
   
   E2E:
   - Add `log4j2-test.properties` output log to `STDOUT` or `STDERR`
   - Remove `log4j.properties` files
   
   
   ## Check list
   
   * [ ] Code changed are covered with tests, or it does not need tests for reason:
   * [ ] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on pull request #3025: [Feature][Log] Integrate slf4j and log4j2 for unified management logs

Posted by GitBox <gi...@apache.org>.
hailin0 commented on PR #3025:
URL: https://github.com/apache/incubator-seatunnel/pull/3025#issuecomment-1299618078

   <img width="1185" alt="image" src="https://user-images.githubusercontent.com/14371345/199410129-96295f12-0d08-440e-81d6-de55aa94d485.png">
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on a diff in pull request #3025: [Feature][Log] Integration log4j2

Posted by GitBox <gi...@apache.org>.
hailin0 commented on code in PR #3025:
URL: https://github.com/apache/incubator-seatunnel/pull/3025#discussion_r990949932


##########
config/log4j2-file.properties:
##########
@@ -0,0 +1,51 @@
+################################################################################
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+property.file_path = logs
+property.file_name = seatunnel
+property.file_split_size = 100MB
+property.file_count = 100
+property.file_ttl = 7d

Review Comment:
   log files:
   max bytes = 100MB * 100
   max times = 7d



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on a diff in pull request #3025: [Feature][Log] Integration log4j2

Posted by GitBox <gi...@apache.org>.
hailin0 commented on code in PR #3025:
URL: https://github.com/apache/incubator-seatunnel/pull/3025#discussion_r990746843


##########
seatunnel-e2e/seatunnel-e2e-common/src/test/resources/log4j2-test.properties:
##########
@@ -0,0 +1,41 @@
+################################################################################
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+rootLogger.level = INFO
+rootLogger.appenderRef.consoleInfo.ref = consoleInfo
+rootLogger.appenderRef.consoleWarn.ref = consoleWarn
+
+appender.consoleInfo.name = consoleInfo
+appender.consoleInfo.type = CONSOLE
+appender.consoleInfo.target = SYSTEM_OUT
+appender.consoleInfo.layout.type = PatternLayout
+appender.consoleInfo.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %c - %m%n
+appender.consoleInfo.filter.acceptLtWarn.type = ThresholdFilter
+appender.consoleInfo.filter.acceptLtWarn.level = WARN
+appender.consoleInfo.filter.acceptLtWarn.onMatch = DENY
+appender.consoleInfo.filter.acceptLtWarn.onMismatch = ACCEPT
+
+appender.consoleWarn.name = consoleWarn
+appender.consoleWarn.type = CONSOLE
+appender.consoleWarn.target = SYSTEM_ERR
+appender.consoleWarn.layout.type = PatternLayout
+appender.consoleWarn.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %c - %m%n
+appender.consoleWarn.filter.acceptGteWarn.type = ThresholdFilter
+appender.consoleWarn.filter.acceptGteWarn.level = WARN
+appender.consoleWarn.filter.acceptGteWarn.onMatch = ACCEPT
+appender.consoleWarn.filter.acceptGteWarn.onMismatch = DENY

Review Comment:
   <img width="1615" alt="image" src="https://user-images.githubusercontent.com/14371345/194743370-5a9efd86-53f5-4703-8b8a-78f1d4d6e6bd.png">
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on pull request #3025: [Feature][Log] Integration log4j2

Posted by GitBox <gi...@apache.org>.
hailin0 commented on PR #3025:
URL: https://github.com/apache/incubator-seatunnel/pull/3025#issuecomment-1272349830

   Add notes to v1 documents:Need to add `runtime` jar to flink engine at runtime
   
   <img width="1089" alt="image" src="https://user-images.githubusercontent.com/14371345/194716827-d160ec2f-b091-4410-b398-81c9a7f81244.png">
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on pull request #3025: [Feature][Log] Integrate slf4j and log4j2 for unified management logs

Posted by GitBox <gi...@apache.org>.
hailin0 commented on PR #3025:
URL: https://github.com/apache/incubator-seatunnel/pull/3025#issuecomment-1275523336

   @EricJoy2048 @ashulin @Hisoka-X @CalvinKirs   thx. PTAL


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] EricJoy2048 commented on pull request #3025: [Feature][Log] Integration log4j2

Posted by GitBox <gi...@apache.org>.
EricJoy2048 commented on PR #3025:
URL: https://github.com/apache/incubator-seatunnel/pull/3025#issuecomment-1273242272

   Please fix CI problem.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on a diff in pull request #3025: [Feature][Log] Integration log4j2

Posted by GitBox <gi...@apache.org>.
hailin0 commented on code in PR #3025:
URL: https://github.com/apache/incubator-seatunnel/pull/3025#discussion_r990733071


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/log/Log4j2HttpGetCommandProcessor.java:
##########
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.engine.server.log;
+
+import com.hazelcast.internal.ascii.TextCommandService;
+import com.hazelcast.internal.ascii.rest.HttpCommandProcessor;
+import com.hazelcast.internal.ascii.rest.HttpGetCommand;
+import com.hazelcast.internal.ascii.rest.HttpGetCommandProcessor;
+import com.hazelcast.internal.json.JsonObject;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.config.LoggerConfig;
+
+import java.util.Map;
+
+public class Log4j2HttpGetCommandProcessor extends HttpCommandProcessor<HttpGetCommand> {
+
+    private final HttpGetCommandProcessor original;
+
+    public Log4j2HttpGetCommandProcessor(TextCommandService textCommandService) {
+        this(textCommandService, new HttpGetCommandProcessor(textCommandService));
+    }
+
+    public Log4j2HttpGetCommandProcessor(TextCommandService textCommandService,
+                                         HttpGetCommandProcessor httpGetCommandProcessor) {
+        super(textCommandService, textCommandService.getNode().getLogger(Log4j2HttpGetCommandProcessor.class));
+        this.original = httpGetCommandProcessor;
+    }
+
+    @Override
+    public void handleRejection(HttpGetCommand request) {
+        handle(request);
+    }
+
+    @Override
+    public void handle(HttpGetCommand request) {
+        String uri = request.getURI();
+        if (uri.startsWith(HttpCommandProcessor.URI_LOG_LEVEL)) {
+            outputAllLoggerLevel(request);

Review Comment:
   example
   
   <img width="580" alt="image" src="https://user-images.githubusercontent.com/14371345/194738709-d9163420-3def-42ce-b1e7-7ef308a80ae5.png">
   



##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/log/Log4j2HttpPostCommandProcessor.java:
##########
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.engine.server.log;
+
+import static com.hazelcast.internal.ascii.rest.HttpStatusCode.SC_500;
+
+import com.hazelcast.internal.ascii.TextCommandService;
+import com.hazelcast.internal.ascii.rest.HttpCommandProcessor;
+import com.hazelcast.internal.ascii.rest.HttpPostCommand;
+import com.hazelcast.internal.ascii.rest.HttpPostCommandProcessor;
+import com.hazelcast.internal.json.JsonObject;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.core.config.Configurator;
+import org.apache.logging.log4j.core.config.LoggerConfig;
+
+public class Log4j2HttpPostCommandProcessor extends HttpCommandProcessor<HttpPostCommand> {
+
+    private final HttpPostCommandProcessor original;
+
+    public Log4j2HttpPostCommandProcessor(TextCommandService textCommandService) {
+        this(textCommandService, new HttpPostCommandProcessor(textCommandService));
+    }
+
+    public Log4j2HttpPostCommandProcessor(TextCommandService textCommandService,
+                                          HttpPostCommandProcessor httpPostCommandProcessor) {
+        super(textCommandService, textCommandService.getNode().getLogger(Log4j2HttpPostCommandProcessor.class));
+        this.original = httpPostCommandProcessor;
+    }
+
+    @Override
+    public void handleRejection(HttpPostCommand request) {
+        handle(request);
+    }
+
+    @Override
+    public void handle(HttpPostCommand request) {
+        String uri = request.getURI();
+        if (uri.startsWith(HttpCommandProcessor.URI_LOG_LEVEL)) {
+            setLoggerLevel(request);

Review Comment:
   example
   
   <img width="1112" alt="image" src="https://user-images.githubusercontent.com/14371345/194738748-5c23fa97-1e89-4cfa-9604-3b33162a5ca0.png">
   <img width="546" alt="image" src="https://user-images.githubusercontent.com/14371345/194738757-fa182c04-a839-459a-aa32-91b4bcaa1c05.png">
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on pull request #3025: [Feature][Log] Integration log4j2

Posted by GitBox <gi...@apache.org>.
hailin0 commented on PR #3025:
URL: https://github.com/apache/incubator-seatunnel/pull/3025#issuecomment-1272759967

   network timeout
   
   <img width="1418" alt="image" src="https://user-images.githubusercontent.com/14371345/194798073-c0ebd3ee-1487-4b4f-94b4-a80fe9461509.png">
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on a diff in pull request #3025: [Feature][Log] Integration log4j2

Posted by GitBox <gi...@apache.org>.
hailin0 commented on code in PR #3025:
URL: https://github.com/apache/incubator-seatunnel/pull/3025#discussion_r992065393


##########
config/log4j2.properties:
##########
@@ -0,0 +1,77 @@
+################################################################################
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+property.file_path = ${sys:seatunnel.logs.path:-/tmp/seatunnel/logs}
+property.file_name = ${sys:seatunnel.logs.file_name:-seatunnel}
+property.file_split_size = 100MB
+property.file_count = 100
+property.file_ttl = 7d
+rootLogger.level = INFO
+
+################################# console log #################################
+rootLogger.appenderRef.consoleInfo.ref = consoleInfo
+rootLogger.appenderRef.consoleWarn.ref = consoleWarn
+################################# console log #################################
+################################# file log    #################################
+#rootLogger.appenderRef.file.ref = fileAppender

Review Comment:
   Disable file log



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on pull request #3025: [Feature][Log] Integration log4j2

Posted by GitBox <gi...@apache.org>.
hailin0 commented on PR #3025:
URL: https://github.com/apache/incubator-seatunnel/pull/3025#issuecomment-1273275213

   > Please fix CI problem.
   
   <img width="1641" alt="image" src="https://user-images.githubusercontent.com/14371345/194871200-5a12afca-36ae-4e68-8696-b431e852545c.png">
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on pull request #3025: [Feature][Log] Integration log4j2

Posted by GitBox <gi...@apache.org>.
hailin0 commented on PR #3025:
URL: https://github.com/apache/incubator-seatunnel/pull/3025#issuecomment-1273151958

   Improve maven package:
   
   **starter[spark、flink]**
   change before:
   starter shade jar include: slf4j、 log4j1.x
   <img width="680" alt="企业微信截图_bf7a05da-21c3-4fb6-996c-8cd9bb29a144" src="https://user-images.githubusercontent.com/14371345/194851222-c096e3c1-e068-4da8-a672-ec8f1a973db5.png">
   
   
   change after:
   starter shade jar exclude: slf4j、 log4j1.x,   include:jcl-over-slf4j
   <img width="680" alt="企业微信截图_f5f9b718-7404-49f1-a47c-d35d2e68c970" src="https://user-images.githubusercontent.com/14371345/194851275-d43852ba-e465-46f8-aff9-c37e097e9fa4.png">
   
   
   **connector:example seatunnel-connector-flink-clickhouse**
   change before:
   connector shade jar include: commons-logging, or other loggings
   <img width="701" alt="企业微信截图_574e6a49-c39a-45f7-a744-cb1fc068e6eb" src="https://user-images.githubusercontent.com/14371345/194853184-b76a02b9-d711-4fb9-8307-e028a6aba2ef.png">
   
   change after:
   connector shade jar exclude all logging packages
   <img width="666" alt="企业微信截图_1d2163d6-351f-480f-a02e-73660793dbc8" src="https://user-images.githubusercontent.com/14371345/194853232-95956f58-1683-4991-83e3-207aed7cd6b6.png">
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on a diff in pull request #3025: [Feature][Log] Integration log4j2

Posted by GitBox <gi...@apache.org>.
hailin0 commented on code in PR #3025:
URL: https://github.com/apache/incubator-seatunnel/pull/3025#discussion_r992071893


##########
seatunnel-core/seatunnel-core-flink-sql/src/main/bin/start-seatunnel-sql.sh:
##########
@@ -50,15 +50,24 @@ else
     args=$@
 fi
 
+set +u
+# Log4j2 Config
+if [ -e "${CONF_DIR}/log4j2.properties" ]; then
+  JAVA_OPTS="${JAVA_OPTS} -Dlog4j2.configurationFile=${CONF_DIR}/log4j2.properties"
+  JAVA_OPTS="${JAVA_OPTS} -Dseatunnel.logs.path=${APP_DIR}/logs"
+  JAVA_OPTS="${JAVA_OPTS} -Dseatunnel.logs.file_name=seatunnel-core-flink-sql"
+fi
+
+CLASS_PATH=${APP_DIR}/lib/logging/*:${APP_JAR}
 
-CMD=$(java -cp ${APP_JAR} ${APP_MAIN} ${args}) && EXIT_CODE=$? || EXIT_CODE=$?
+CMD=$(java ${JAVA_OPTS} -cp ${CLASS_PATH} ${APP_MAIN} ${args}) && EXIT_CODE=$? || EXIT_CODE=$?
 if [ ${EXIT_CODE} -eq 234 ]; then
     # print usage
     echo "${CMD}"
     exit 0
 elif [ ${EXIT_CODE} -eq 0 ]; then
-    echo "Execute SeaTunnel Flink SQL Job: ${CMD}"
-    eval ${CMD}
+    echo "Execute SeaTunnel Flink SQL Job: $(echo "${CMD}" | tail -n 1)"
+    eval $(echo "${CMD}" | tail -n 1)

Review Comment:
   tail last line text



##########
config/log4j2.properties:
##########
@@ -0,0 +1,77 @@
+################################################################################
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+property.file_path = ${sys:seatunnel.logs.path:-/tmp/seatunnel/logs}
+property.file_name = ${sys:seatunnel.logs.file_name:-seatunnel}
+property.file_split_size = 100MB
+property.file_count = 100
+property.file_ttl = 7d

Review Comment:
   log files:
   max bytes = 100MB * 100
   max times = 7d



##########
config/log4j2.properties:
##########
@@ -0,0 +1,77 @@
+################################################################################
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+property.file_path = ${sys:seatunnel.logs.path:-/tmp/seatunnel/logs}
+property.file_name = ${sys:seatunnel.logs.file_name:-seatunnel}
+property.file_split_size = 100MB
+property.file_count = 100
+property.file_ttl = 7d
+rootLogger.level = INFO
+
+################################# console log #################################
+rootLogger.appenderRef.consoleInfo.ref = consoleInfo
+rootLogger.appenderRef.consoleWarn.ref = consoleWarn
+################################# console log #################################
+################################# file log    #################################
+#rootLogger.appenderRef.file.ref = fileAppender

Review Comment:
   Enable file log



##########
seatunnel-core/seatunnel-core-flink-sql/src/main/bin/start-seatunnel-sql.sh:
##########
@@ -50,15 +50,24 @@ else
     args=$@
 fi
 
+set +u
+# Log4j2 Config
+if [ -e "${CONF_DIR}/log4j2.properties" ]; then
+  JAVA_OPTS="${JAVA_OPTS} -Dlog4j2.configurationFile=${CONF_DIR}/log4j2.properties"
+  JAVA_OPTS="${JAVA_OPTS} -Dseatunnel.logs.path=${APP_DIR}/logs"
+  JAVA_OPTS="${JAVA_OPTS} -Dseatunnel.logs.file_name=seatunnel-core-flink-sql"

Review Comment:
   Add log4j2 system properties



##########
seatunnel-core/seatunnel-core-spark/src/main/bin/start-seatunnel-spark.sh:
##########
@@ -49,14 +49,24 @@ else
     args=$@
 fi
 
-CMD=$(java -cp ${APP_JAR} ${APP_MAIN} ${args}) && EXIT_CODE=$? || EXIT_CODE=$?
+set +u
+# Log4j2 Config
+if [ -e "${CONF_DIR}/log4j2.properties" ]; then
+  JAVA_OPTS="${JAVA_OPTS} -Dlog4j2.configurationFile=${CONF_DIR}/log4j2.properties"
+  JAVA_OPTS="${JAVA_OPTS} -Dseatunnel.logs.path=${APP_DIR}/logs"
+  JAVA_OPTS="${JAVA_OPTS} -Dseatunnel.logs.file_name=seatunnel-core-spark"
+fi
+
+CLASS_PATH=${APP_DIR}/lib/logging/*:${APP_JAR}
+
+CMD=$(java ${JAVA_OPTS} -cp ${CLASS_PATH} ${APP_MAIN} ${args}) && EXIT_CODE=$? || EXIT_CODE=$?
 if [ ${EXIT_CODE} -eq 234 ]; then
     # print usage
     echo "${CMD}"
     exit 0
 elif [ ${EXIT_CODE} -eq 0 ]; then
-    echo "Execute SeaTunnel Spark Job: $(echo ${CMD} | tail -n 1)"
-    eval $(echo ${CMD} | tail -n 1)
+    echo "Execute SeaTunnel Spark Job: $(echo "${CMD}" | tail -n 1)"
+    eval $(echo "${CMD}" | tail -n 1)

Review Comment:
   Fix tail last line text: ${CMD} -> "${CMD}"



##########
seatunnel-core/seatunnel-core-flink-sql/src/main/bin/start-seatunnel-sql.sh:
##########
@@ -50,15 +50,24 @@ else
     args=$@
 fi
 
+set +u
+# Log4j2 Config
+if [ -e "${CONF_DIR}/log4j2.properties" ]; then
+  JAVA_OPTS="${JAVA_OPTS} -Dlog4j2.configurationFile=${CONF_DIR}/log4j2.properties"
+  JAVA_OPTS="${JAVA_OPTS} -Dseatunnel.logs.path=${APP_DIR}/logs"
+  JAVA_OPTS="${JAVA_OPTS} -Dseatunnel.logs.file_name=seatunnel-core-flink-sql"
+fi
+
+CLASS_PATH=${APP_DIR}/lib/logging/*:${APP_JAR}

Review Comment:
   add `lib/logging/` into starter jar classpath



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on a diff in pull request #3025: [Feature][Log] Integration log4j2

Posted by GitBox <gi...@apache.org>.
hailin0 commented on code in PR #3025:
URL: https://github.com/apache/incubator-seatunnel/pull/3025#discussion_r990659761


##########
seatunnel-e2e/seatunnel-e2e-common/src/test/resources/log4j2-test.properties:
##########
@@ -0,0 +1,41 @@
+################################################################################
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+rootLogger.level = INFO
+rootLogger.appenderRef.consoleInfo.ref = consoleInfo
+rootLogger.appenderRef.consoleWarn.ref = consoleWarn
+
+appender.consoleInfo.name = consoleInfo
+appender.consoleInfo.type = CONSOLE
+appender.consoleInfo.target = SYSTEM_OUT
+appender.consoleInfo.layout.type = PatternLayout
+appender.consoleInfo.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %c - %m%n
+appender.consoleInfo.filter.acceptLtWarn.type = ThresholdFilter
+appender.consoleInfo.filter.acceptLtWarn.level = WARN
+appender.consoleInfo.filter.acceptLtWarn.onMatch = DENY
+appender.consoleInfo.filter.acceptLtWarn.onMismatch = ACCEPT
+
+appender.consoleWarn.name = consoleWarn
+appender.consoleWarn.type = CONSOLE
+appender.consoleWarn.target = SYSTEM_ERR
+appender.consoleWarn.layout.type = PatternLayout
+appender.consoleWarn.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %c - %m%n
+appender.consoleWarn.filter.acceptGteWarn.type = ThresholdFilter
+appender.consoleWarn.filter.acceptGteWarn.level = WARN
+appender.consoleWarn.filter.acceptGteWarn.onMatch = ACCEPT
+appender.consoleWarn.filter.acceptGteWarn.onMismatch = DENY

Review Comment:
   log example:  STDOUT、STDERR
   
   <img width="1719" alt="image" src="https://user-images.githubusercontent.com/14371345/194717217-5e3334e7-61d4-4a69-9245-4f0be07ad464.png">
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on a diff in pull request #3025: [Feature][Log] Integrate slf4j and log4j2 for unified management logs

Posted by GitBox <gi...@apache.org>.
hailin0 commented on code in PR #3025:
URL: https://github.com/apache/incubator-seatunnel/pull/3025#discussion_r994346633


##########
seatunnel-core/seatunnel-starter/pom.xml:
##########
@@ -52,10 +52,44 @@
             <artifactId>seatunnel-engine-server</artifactId>
             <version>${project.version}</version>
         </dependency>
+
+        <!-- Declare log4j2 asynchronous loggers provider: disruptor -->
+        <dependency>
+            <groupId>com.lmax</groupId>
+            <artifactId>disruptor</artifactId>
+        </dependency>
+
     </dependencies>
 
     <build>
         <finalName>${project.name}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <configuration>
+                    <artifactSet>
+                        <excludes>
+                            <!-- not excluded: slf4j-api & log4j2 & xxx-to-slf4j bridges -->
+                            <exclude>org.slf4j:slf4j-jdk14</exclude>
+                            <exclude>org.slf4j:slf4j-nop</exclude>
+                            <exclude>org.slf4j:slf4j-simple</exclude>
+                            <exclude>org.slf4j:slf4j-reload4j</exclude>
+                            <exclude>org.slf4j:slf4j-log4j12</exclude>
+                            <exclude>log4j:*</exclude>
+                            <exclude>commons-logging:*</exclude>
+                            <exclude>ch.qos.logback:*</exclude>
+                            <exclude>org.apache.logging.log4j:log4j-to-slf4j</exclude>
+                        </excludes>
+                    </artifactSet>
+                </configuration>
+            </plugin>
+            <!-- make sure that flatten runs after maven-shade-plugin -->
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>flatten-maven-plugin</artifactId>
+            </plugin>

Review Comment:
   Do I need to delete?
   @ashulin 
   
   https://github.com/apache/incubator-seatunnel/pull/3078



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on pull request #3025: [Feature][Log] Integrate slf4j and log4j2 for unified management logs

Posted by GitBox <gi...@apache.org>.
hailin0 commented on PR #3025:
URL: https://github.com/apache/incubator-seatunnel/pull/3025#issuecomment-1275653653

   close #2474
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on a diff in pull request #3025: [Feature][Log] Integration log4j2

Posted by GitBox <gi...@apache.org>.
hailin0 commented on code in PR #3025:
URL: https://github.com/apache/incubator-seatunnel/pull/3025#discussion_r991148891


##########
seatunnel-core/pom.xml:
##########
@@ -31,18 +31,47 @@
     <packaging>pom</packaging>
 
     <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-dependency-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>copy-starter-logging-package-for-e2e</id>
+                            <phase>package</phase>
+                            <goals>
+                                <goal>copy-dependencies</goal>
+                            </goals>
+                            <configuration>
+                                <excludeTransitive>false</excludeTransitive>
+                                <includeGroupIds>org.slf4j,org.apache.logging.log4j</includeGroupIds>
+                                <includeArtifactIds>slf4j-api,jcl-over-slf4j,log4j-slf4j-impl,log4j-api,log4j-core</includeArtifactIds>
+                                <outputDirectory>${project.build.directory}/logging-e2e</outputDirectory>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+            </plugins>
+        </pluginManagement>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>
                 <configuration>
-                    <shadedArtifactAttached>false</shadedArtifactAttached>
-                    <createDependencyReducedPom>true</createDependencyReducedPom>
-                    <!-- Make sure the transitive dependencies are written to the generated pom under <dependencies> -->
-                    <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
                     <artifactSet>
                         <excludes>
+                            <!-- not excluded: xxx-to-slf4j bridges, e.g. org.slf4j:jcl-over-slf4j  -->
+                            <exclude>org.slf4j:slf4j-api</exclude>
+                            <exclude>org.slf4j:slf4j-jdk14</exclude>
+                            <exclude>org.slf4j:slf4j-nop</exclude>
+                            <exclude>org.slf4j:slf4j-simple</exclude>
+                            <exclude>org.slf4j:slf4j-reload4j</exclude>
+                            <exclude>org.slf4j:slf4j-log4j12</exclude>
                             <exclude>ch.qos.logback:*</exclude>
+                            <exclude>log4j:*</exclude>
+                            <exclude>org.apache.logging.log4j:*</exclude>
+                            <exclude>commons-logging:*</exclude>
                         </excludes>

Review Comment:
   starter shade jar include jcl-over-slf4j
   
   
   <img width="1716" alt="image" src="https://user-images.githubusercontent.com/14371345/194848559-aed726d6-e1bf-4bb1-b44a-6ffd05f6f695.png">
   



##########
seatunnel-core/pom.xml:
##########
@@ -31,21 +31,31 @@
     <packaging>pom</packaging>
 
     <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-dependency-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>copy-starter-logging-package-for-e2e</id>
+                            <phase>package</phase>
+                            <goals>
+                                <goal>copy-dependencies</goal>
+                            </goals>
+                            <configuration>
+                                <includeGroupIds>org.slf4j,org.apache.logging.log4j</includeGroupIds>
+                                <outputDirectory>${project.build.directory}/logging-e2e</outputDirectory>

Review Comment:
   <img width="398" alt="企业微信截图_c16d0688-371c-4240-a391-8fc404626ef7" src="https://user-images.githubusercontent.com/14371345/194847942-9539df86-620d-41f3-801d-77f10ca4b5d4.png">
   



##########
seatunnel-dist/src/main/assembly/assembly-bin-ci.xml:
##########
@@ -115,6 +115,21 @@
         </file>
     </files>
     <dependencySets>
+        <!-- ============ Logging Jars ============  -->
+        <dependencySet>
+            <useProjectArtifact>false</useProjectArtifact>
+            <useTransitiveDependencies>true</useTransitiveDependencies>
+            <unpack>false</unpack>
+            <outputDirectory>/lib/logging</outputDirectory>
+            <includes>
+                <include>org.slf4j:slf4j-api:jar</include>
+                <include>org.slf4j:jcl-over-slf4j:jar</include>
+                <include>org.apache.logging.log4j:log4j-api:jar</include>
+                <include>org.apache.logging.log4j:log4j-core:jar</include>
+                <include>org.apache.logging.log4j:log4j-slf4j-impl:jar</include>
+            </includes>

Review Comment:
   <img width="333" alt="企业微信截图_ffd01110-a84e-46c4-b1d8-4ab07c730025" src="https://user-images.githubusercontent.com/14371345/194849532-abe24b4d-a33e-4239-89e9-2a54d64989aa.png">
   



##########
seatunnel-e2e/seatunnel-e2e-common/src/test/java/org/apache/seatunnel/e2e/common/util/ContainerUtil.java:
##########
@@ -83,6 +83,17 @@ public static String copyConfigFileToContainer(GenericContainer<?> container, St
         return targetConfInContainer;
     }
 
+    public static void copySeaTunnelStarterCommonJar(GenericContainer<?> container,
+                                                     String startModulePath,
+                                                     String seatunnelHomeInContainer) {
+        // copy logging lib
+        final String loggingLibPath = startModulePath + File.separator + "target" + File.separator + "logging-e2e" + File.separator;
+        checkPathExist(loggingLibPath);
+        container.copyFileToContainer(
+            MountableFile.forHostPath(loggingLibPath),
+            Paths.get(seatunnelHomeInContainer, "lib", "logging").toString());
+    }
+

Review Comment:
   mapping module dir to Container:
   
   module dir:
   <img width="398" alt="企业微信截图_c16d0688-371c-4240-a391-8fc404626ef7" src="https://user-images.githubusercontent.com/14371345/194849968-fa831764-b569-481f-960a-58fe344f4967.png">
   
   Container dir:
   <img width="344" alt="image" src="https://user-images.githubusercontent.com/14371345/194850111-3612320b-f8a2-4138-84bb-1a59d9fa7710.png">
   



##########
seatunnel-core/seatunnel-starter/pom.xml:
##########
@@ -52,10 +52,44 @@
             <artifactId>seatunnel-engine-server</artifactId>
             <version>${project.version}</version>
         </dependency>
+
+        <!-- Declare log4j2 asynchronous loggers provider: disruptor -->
+        <dependency>
+            <groupId>com.lmax</groupId>
+            <artifactId>disruptor</artifactId>
+        </dependency>
+
     </dependencies>
 
     <build>
         <finalName>${project.name}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <configuration>
+                    <artifactSet>
+                        <excludes>
+                            <!-- not excluded: slf4j-api & log4j2 & xxx-to-slf4j bridges -->
+                            <exclude>org.slf4j:slf4j-jdk14</exclude>
+                            <exclude>org.slf4j:slf4j-nop</exclude>
+                            <exclude>org.slf4j:slf4j-simple</exclude>
+                            <exclude>org.slf4j:slf4j-reload4j</exclude>
+                            <exclude>org.slf4j:slf4j-log4j12</exclude>
+                            <exclude>log4j:*</exclude>
+                            <exclude>commons-logging:*</exclude>
+                            <exclude>ch.qos.logback:*</exclude>
+                            <exclude>org.apache.logging.log4j:log4j-to-slf4j</exclude>
+                        </excludes>

Review Comment:
   seatunnel starter shade jar include : slf4j-api、log4j-api、log4j-core、log4j-slf4j-impl、jcl-over-slf4j、disruptor
   
   <img width="1716" alt="image" src="https://user-images.githubusercontent.com/14371345/194849171-4ff3c986-567a-4b83-8775-887ede6d1e51.png">
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on a diff in pull request #3025: [Feature][Log] Integration log4j2

Posted by GitBox <gi...@apache.org>.
hailin0 commented on code in PR #3025:
URL: https://github.com/apache/incubator-seatunnel/pull/3025#discussion_r990949932


##########
config/log4j2-file.properties:
##########
@@ -0,0 +1,51 @@
+################################################################################
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+property.file_path = logs
+property.file_name = seatunnel
+property.file_split_size = 100MB
+property.file_count = 100
+property.file_ttl = 7d

Review Comment:
   log files:
   max bytes = 100MB * 10
   max times = 7d



##########
seatunnel-core/seatunnel-starter/pom.xml:
##########
@@ -52,10 +52,45 @@
             <artifactId>seatunnel-engine-server</artifactId>
             <version>${project.version}</version>
         </dependency>
+
+        <!-- Declare log4j2 asynchronous loggers provider: disruptor -->
+        <dependency>
+            <groupId>com.lmax</groupId>
+            <artifactId>disruptor</artifactId>
+        </dependency>
+
     </dependencies>
 
     <build>
         <finalName>${project.name}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <configuration>
+                    <artifactSet>
+                        <excludes>
+                            <!-- not excluded slf4j-api & log4j2 & bridges -->
+                            <exclude>org.slf4j:slf4j-jdk14</exclude>
+                            <exclude>org.slf4j:slf4j-nop</exclude>
+                            <exclude>org.slf4j:slf4j-simple</exclude>
+                            <exclude>org.slf4j:slf4j-reload4j</exclude>
+                            <exclude>org.slf4j:slf4j-log4j12</exclude>
+                            <exclude>log4j:*</exclude>
+                            <exclude>commons-logging:*</exclude>
+                            <exclude>ch.qos.logback:*</exclude>
+                            <!--  -->
+                            <exclude>org.apache.logging.log4j:log4j-to-slf4j</exclude>
+                        </excludes>
+                    </artifactSet>
+                </configuration>

Review Comment:
   Override the parent's configuration
   
   include: slf4j-api & log4j2



##########
seatunnel-core/pom.xml:
##########
@@ -31,21 +31,31 @@
     <packaging>pom</packaging>
 
     <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-dependency-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>copy-starter-logging-package-for-e2e</id>
+                            <phase>package</phase>
+                            <goals>
+                                <goal>copy-dependencies</goal>
+                            </goals>
+                            <configuration>
+                                <includeGroupIds>org.slf4j,org.apache.logging.log4j</includeGroupIds>
+                                <outputDirectory>${project.build.directory}/logging-e2e</outputDirectory>

Review Comment:
   use by e2e



##########
seatunnel-core/pom.xml:
##########
@@ -31,21 +31,31 @@
     <packaging>pom</packaging>
 
     <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-dependency-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>copy-starter-logging-package-for-e2e</id>
+                            <phase>package</phase>
+                            <goals>
+                                <goal>copy-dependencies</goal>
+                            </goals>
+                            <configuration>
+                                <includeGroupIds>org.slf4j,org.apache.logging.log4j</includeGroupIds>
+                                <outputDirectory>${project.build.directory}/logging-e2e</outputDirectory>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+            </plugins>
+        </pluginManagement>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>
-                <configuration>
-                    <shadedArtifactAttached>false</shadedArtifactAttached>
-                    <createDependencyReducedPom>true</createDependencyReducedPom>
-                    <!-- Make sure the transitive dependencies are written to the generated pom under <dependencies> -->
-                    <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
-                    <artifactSet>
-                        <excludes>
-                            <exclude>ch.qos.logback:*</exclude>
-                        </excludes>
-                    </artifactSet>
-                </configuration>

Review Comment:
   configuration from extends parent pom



##########
seatunnel-core/seatunnel-starter/src/main/bin/seatunnel-cluster.sh:
##########
@@ -60,4 +60,14 @@ if [ -z $SEATUNNEL_CONFIG ]; then
     SEATUNNEL_CONFIG=${CONF_DIR}/seatunnel.yaml
 fi
 
-java -Dseatunnel.config=${SEATUNNEL_CONFIG} -Dhazelcast.config=${HAZELCAST_CONFIG} -cp ${APP_JAR} ${APP_MAIN} ${args}
+if [ -z $LOG4J2_CONFIG ]; then
+    LOG4J2_CONFIG=${CONF_DIR}/log4j2-file.properties
+fi
+
+if [ -z $LOG4J2_CONTEXT_SELECTOR ]; then
+    LOG4J2_CONTEXT_SELECTOR="org.apache.logging.log4j.core.async.AsyncLoggerContextSelector"

Review Comment:
   Enable async logger



##########
seatunnel-engine/seatunnel-engine-common/src/main/resources/hazelcast.yaml:
##########
@@ -17,7 +17,14 @@
 
 hazelcast:
   cluster-name: seatunnel
+  properties:
+    hazelcast.logging.type: log4j2
   network:
+    rest-api:
+      enabled: true
+      endpoint-groups:
+        CLUSTER_WRITE:
+          enabled: true

Review Comment:
   Enable API:       POST /hazelcast/rest/log-level



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] EricJoy2048 commented on pull request #3025: [Feature][Log] Integrate slf4j and log4j2 for unified management logs

Posted by GitBox <gi...@apache.org>.
EricJoy2048 commented on PR #3025:
URL: https://github.com/apache/incubator-seatunnel/pull/3025#issuecomment-1276239150

   resolve conflicts please.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] Hisoka-X merged pull request #3025: [Feature][Log] Integrate slf4j and log4j2 for unified management logs

Posted by GitBox <gi...@apache.org>.
Hisoka-X merged PR #3025:
URL: https://github.com/apache/incubator-seatunnel/pull/3025


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org