Skip to content

Commit

Permalink
Merge pull request #2027 from wangyu096/issue_1973
Browse files Browse the repository at this point in the history
fix: 微服务job-execute的gse.log 日志输出太多导致磁盘空间不足 #1973
  • Loading branch information
wangyu096 authored May 6, 2023
2 parents 0c47cf3 + ba2c829 commit 6869f7d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public <T, R> void logResp(Logger log, BkApiContext<T, R> context) {
context.getUri(),
context.isSuccess(),
context.getCostTime(),
context.getResp() != null ? JsonUtils.toJsonWithoutSkippedFields(context.getResp()) :
context.getResp() != null ? JsonUtils.toJson(context.getResp()) :
StringUtil.substring(context.getOriginResp(), 10000));
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.tencent.bk.job.common.gse.v2.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.tencent.bk.job.common.util.json.SkipLogFields;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;
Expand Down Expand Up @@ -71,8 +70,7 @@ public class ScriptAgentTaskResult {
/**
* 脚本输出日志
*/
@JsonProperty("screen")
@SkipLogFields
@JsonProperty(value = "screen", access = JsonProperty.Access.WRITE_ONLY)
private String screen;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class AgentServiceImpl implements AgentService {
@Override
public HostDTO load(String key) {
HostDTO agentHost = getAgentBindHost();
log.debug("load agentHost and save to cache:{}", agentHost);
log.info("Load agent host and save to cache:{}", agentHost);
return agentHost;
}
}
Expand Down

0 comments on commit 6869f7d

Please sign in to comment.