use of com.aliyun.openservices.log.exception.LogException in project opscloud4 by ixrjog.
the class AliyunLogMachineGroupDriver method applyConfigToMachineGroup.
/**
* 将配置应用到机器组
*
* @param logMember
* @return
*/
private void applyConfigToMachineGroup(AliyunConfig.Aliyun aliyun, AliyunLogMemberVO.LogMember logMember) {
ApplyConfigToMachineGroupRequest req = new ApplyConfigToMachineGroupRequest(logMember.getLog().getProject(), logMember.getServerGroup().getName(), logMember.getLog().getConfig());
try {
Client client = buildClient(aliyun);
client.ApplyConfigToMachineGroup(req);
} catch (LogException lg) {
lg.printStackTrace();
}
}
use of com.aliyun.openservices.log.exception.LogException in project opscloud4 by ixrjog.
the class AliyunLogMachineGroupDriver method updateMachineGroup.
public void updateMachineGroup(AliyunConfig.Aliyun aliyun, AliyunLogMemberVO.LogMember logMember) {
MachineGroup machineGroup = new MachineGroup(logMember.getServerGroupName(), MACHINE_IDENTIFY_TYPE, logMember.getMachineList());
machineGroup.SetGroupTopic(StringUtils.isEmpty(logMember.getTopic()) ? logMember.getServerGroupName() : logMember.getTopic());
try {
Client client = buildClient(aliyun);
UpdateMachineGroupRequest req = new UpdateMachineGroupRequest(logMember.getLog().getProject(), machineGroup);
client.UpdateMachineGroup(req);
} catch (LogException lg) {
log.error("阿里云日志服务更新MachineGroup错误! , {}", lg.GetErrorMessage());
}
}
Aggregations