1
jyy
2021-07-11 2957623eed5fabb83b8f64dc106ec9b6d129c09d
zq-erp/src/main/java/com/matrix/core/tools/MatrixFileAppender.java
@@ -1,6 +1,8 @@
package com.matrix.core.tools;
import org.apache.log4j.DailyRollingFileAppender;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
/**
 * 日志记录适配器
@@ -9,7 +11,11 @@
 * @email 935090232@qq.com
 * @date 2017年11月27日
 */
@Component
public class MatrixFileAppender extends DailyRollingFileAppender {
   @Value("${log_path}")
   String log_path;
   /**
    * 设置相对服务器的日志路径
@@ -17,6 +23,6 @@
   @Override
   public void setFile(String file) {
      String val = file.trim();
      fileName = PropertiesUtil.getString("log_path") + val;
      fileName = log_path + val;
   }
}