REQ-3300: 加入是否记录请求的开关
This commit is contained in:
parent
d021497652
commit
8e099c4502
@ -1,6 +1,8 @@
|
||||
|
||||
package cn.axzo.nanopart.ess.server.dao;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -12,11 +14,16 @@ import cn.axzo.nanopart.ess.server.utils.BizAssertions;
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@RefreshScope
|
||||
@Repository("essLogDao")
|
||||
public class EssLogDao extends ServiceImpl<EssLogMapper, EssLog> {
|
||||
|
||||
@Value("${ess.enableRequestLog:true}")
|
||||
private boolean enableRequestLog;
|
||||
|
||||
public void logRequest(String context, Object subject, Object request) {
|
||||
log(context, subject, "request", request);
|
||||
if (enableRequestLog)
|
||||
log(context, subject, "request", request);
|
||||
}
|
||||
|
||||
public void log(String context, Object subject, Object... logContents) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user