use of com.ibeiliao.deployment.common.vo.ServerCollectLog in project Corgi by kevinYin.
the class LogService method collectDeployLog.
/**
* 收集服务器发布执行的shell 日志
* @param id
* @param logType
* @param content
* @return
*/
public boolean collectDeployLog(int id, short logType, String content) {
try {
ServerCollectLog serverShellLog = new ServerCollectLog(id, logType, content);
if (logType == LogType.SERVER_DEPLOY_LOG.getType()) {
collectServerDeployLog(serverShellLog);
}
redis.rpush(RedisLogKey.getServerDeploymentKey(), JSONObject.toJSONString(serverShellLog));
return true;
} catch (Exception e) {
logger.error("收集日志失败 | msg:{}", e.getMessage(), e);
return false;
}
}
Aggregations