Skip to content

Commit

Permalink
Merge branch '3.x' into feat/change_generic_hessian_write_definition_…
Browse files Browse the repository at this point in the history
…everytime_3
  • Loading branch information
JervyShi authored Aug 10, 2022
2 parents a1fcf7f + fc4a518 commit 25dab95
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 69 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.alipay.sofa</groupId>
<artifactId>hessian</artifactId>
<version>3.3.13</version>
<version>3.4.0</version>
<packaging>jar</packaging>

<name>${project.groupId}:${project.artifactId}</name>
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/alipay/hessian/NameBlackListFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ public class NameBlackListFilter implements ClassNameFilter {

//do not change this
public static final String HESSIAN_SERIALIZE_LOG_NAME = "HessianSerializeLog";
public static final String CONFIG_LOG_SPACE_NAME = "com.alipay.sofa.middleware.config";
public static final String CONFIG_LOG_SPACE_NAME = "com.alipay.sofa.hessian";

private static final String CLIENT_LOG_LEVEL = "com.alipay.sofa.middleware.config.log.level";
private static final String CLIENT_LOG_LEVEL = "com.alipay.sofa.hessian.log.level";
private static final String CLIENT_LOG_LEVEL_DEFAULT = "INFO";
private static final String CLIENT_LOG_ENCODE = "com.alipay.sofa.middleware.config.log.encode";
private static final String CLIENT_LOG_ENCODE = "com.alipay.sofa.hessian.log.encode";
private static final String COMMON_ENCODE = "file.encoding";
private static final String CLIENT_LOG_ENCODE_DEFAULT = "UTF-8";

Expand Down
39 changes: 39 additions & 0 deletions src/main/resources/com/alipay/sofa/hessian/log/log4j/log-conf.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="GBK"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<!-- Log4j 1.x config -->
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

<!-- appender -->
<appender name="JDKSerializeAppender" class="org.apache.log4j.DailyRollingFileAppender">
<param name="file" value="${logging.path}/serialize/jdk.log"/>
<param name="append" value="true"/>
<param name="encoding" value="${file.encoding}"/>
<param name="threshold" value="error"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p %-32t - %m%n"/>
</layout>
</appender>

<appender name="HessianSerializeAppender" class="org.apache.log4j.DailyRollingFileAppender">
<param name="file" value="${logging.path}/serialize/hessian.log"/>
<param name="append" value="true"/>
<param name="encoding" value="${file.encoding}"/>
<param name="threshold" value="error"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p %-32t - %m%n"/>
</layout>
</appender>


<logger name="JDKSerializeLog" additivity="false">
<level value="${com.alipay.sofa.hessian.log.level}"/>
<appender-ref ref="JDKSerializeAppender"/>
</logger>

<logger name="HessianSerializeLog" additivity="false">
<level value="${com.alipay.sofa.hessian.log.level}"/>
<appender-ref ref="HessianSerializeAppender"/>
</logger>

</log4j:configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<Configuration status="OFF">
<properties>
<property name="LOG_HOME">${sys:logging.path}/serialize</property>
<Property name="LOG_LEVEL">${sys:com.alipay.sofa.middleware.config.log.level}</Property>
<Property name="LOG_ENCODE">${sys:com.alipay.sofa.middleware.config.log.encode}</Property>
<Property name="LOG_LEVEL">${sys:com.alipay.sofa.hessian.log.level}</Property>
<Property name="LOG_ENCODE">${sys:com.alipay.sofa.hessian.log.encode}</Property>
</properties>

<!-- appenders -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<!-- Logback config -->
<configuration>
<property scope="local" name="LOG_HOME" value="${logging.path}/serialize"/>
<property scope="local" name="LOG_LEVEL" value="${com.alipay.sofa.middleware.config.log.level}"/>
<property scope="local" name="LOG_ENCODE" value="${com.alipay.sofa.middleware.config.log.encode}"/>
<property scope="local" name="LOG_LEVEL" value="${com.alipay.sofa.hessian.log.level}"/>
<property scope="local" name="LOG_ENCODE" value="${com.alipay.sofa.hessian.log.encode}"/>

<!-- appenders -->
<appender name="JDKSerializeAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
Expand Down

This file was deleted.

0 comments on commit 25dab95

Please sign in to comment.