You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2022/08/28 10:46:26 UTC
[inlong] branch master updated: [INLONG-5718][Manager][DataProxy] Fix log4j2 configuration does not take effect (#5719)
This is an automated email from the ASF dual-hosted git repository.
dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 073bc96c3 [INLONG-5718][Manager][DataProxy] Fix log4j2 configuration does not take effect (#5719)
073bc96c3 is described below
commit 073bc96c315577660fade6df5549b701b2d16c7e
Author: emhui <11...@users.noreply.github.com>
AuthorDate: Sun Aug 28 18:46:19 2022 +0800
[INLONG-5718][Manager][DataProxy] Fix log4j2 configuration does not take effect (#5719)
---
inlong-dataproxy/conf/log4j2.xml | 4 +--
.../manager/dao/entity/StreamSourceEntity.java | 34 ++++++++++++++++++++++
.../manager-web/src/main/resources/log4j2.xml | 4 +--
3 files changed, 38 insertions(+), 4 deletions(-)
diff --git a/inlong-dataproxy/conf/log4j2.xml b/inlong-dataproxy/conf/log4j2.xml
index 71ccb85e5..e51602b65 100644
--- a/inlong-dataproxy/conf/log4j2.xml
+++ b/inlong-dataproxy/conf/log4j2.xml
@@ -17,10 +17,10 @@
specific language governing permissions and limitations
under the License.
-->
-<configuration status="WARN" monitorInterval="30" package="org.apache.inlong.dataproxy.config">
+<configuration status="WARN" monitorInterval="30" packages="org.apache.inlong.dataproxy.config">
<Properties>
<property name="basePath">${sys:dataproxy.log.path}</property>
- <property name="log_pattern">%d{yyyy-MM-dd HH:mm:ss.SSS} -%5p ${PID:-} [%15.15t] %-30.30C{1.}:%L %mask%n</property>
+ <property name="log_pattern">%d{yyyy-MM-dd HH:mm:ss.SSS} -%5p ${PID:-} [%15.15t] %-30.30C{1.}:%L %mask %n</property>
<property name="every_file_size">1G</property>
<property name="output_log_level">DEBUG</property>
<property name="rolling_max">50</property>
diff --git a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/StreamSourceEntity.java b/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/StreamSourceEntity.java
index 2d7a1aa9d..dab6db269 100644
--- a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/StreamSourceEntity.java
+++ b/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/StreamSourceEntity.java
@@ -21,6 +21,8 @@ import lombok.Data;
import java.io.Serializable;
import java.util.Date;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.inlong.common.util.MaskDataUtils;
/**
* Stream source entity, including source type, source name, etc.
@@ -56,4 +58,36 @@ public class StreamSourceEntity implements Serializable {
private Date createTime;
private Date modifyTime;
+ @Override
+ public String toString() {
+ if (StringUtils.isNotEmpty(extParams)) {
+ StringBuilder buffer = new StringBuilder(extParams);
+ MaskDataUtils.mask(buffer);
+ extParams = buffer.toString();
+ }
+ return "StreamSourceEntity{"
+ + "id=" + id
+ + ", inlongGroupId='" + inlongGroupId + '\''
+ + ", inlongStreamId='" + inlongStreamId + '\''
+ + ", sourceType='" + sourceType + '\''
+ + ", sourceName='" + sourceName + '\''
+ + ", templateId=" + templateId
+ + ", agentIp='" + agentIp + '\''
+ + ", uuid='" + uuid + '\''
+ + ", dataNodeName='" + dataNodeName + '\''
+ + ", inlongClusterName='" + inlongClusterName + '\''
+ + ", serializationType='" + serializationType + '\''
+ + ", snapshot='" + snapshot + '\''
+ + ", reportTime=" + reportTime
+ + ", extParams='" + extParams + '\''
+ + ", version=" + version
+ + ", status=" + status
+ + ", previousStatus=" + previousStatus
+ + ", isDeleted=" + isDeleted
+ + ", creator='" + creator + '\''
+ + ", modifier='" + modifier + '\''
+ + ", createTime=" + createTime + '\''
+ + ", modifyTime=" + modifyTime
+ + '}';
+ }
}
\ No newline at end of file
diff --git a/inlong-manager/manager-web/src/main/resources/log4j2.xml b/inlong-manager/manager-web/src/main/resources/log4j2.xml
index 7add2849e..674f92e76 100644
--- a/inlong-manager/manager-web/src/main/resources/log4j2.xml
+++ b/inlong-manager/manager-web/src/main/resources/log4j2.xml
@@ -17,10 +17,10 @@
specific language governing permissions and limitations
under the License.
-->
-<configuration status="WARN" monitorInterval="30" package="org.apache.inlong.manager.web.config">
+<configuration status="WARN" monitorInterval="30" packages="org.apache.inlong.manager.web.config">
<properties>
<property name="basePath">logs</property>
- <property name="log_pattern">%d{yyyy-MM-dd HH:mm:ss.SSS} -%5p [%5.30t] %-30.30C{1.}:%L - %mask%n</property>
+ <property name="log_pattern">%d{yyyy-MM-dd HH:mm:ss.SSS} -%5p [%5.30t] %-30.30C{1.}:%L - %mask %n</property>
<property name="every_file_size">1G</property>
<property name="rolling_max">50</property>
<property name="all_fileName">${basePath}/manager-all.log</property>