protected void onBtnLogRefreshClick() throws PresentationLogicException { //WDEV-17041 if (form.lyr1().tabLog().intNumKb().getValue()==null) { engine.showMessage("'Retrieve Last' field is mandatory"); return; } AppSessionVo vo = form.lyr1().tabSess().grdSess().getValue(); LogFileVo log; try { log = domain.getLogFile(vo, form.lyr1().tabLog().intNumKb().getValue()); setLogDetails(log); } catch (DomainInterfaceException e) { engine.showMessage(e.getMessage()); } }
private void setLogDetails(LogFileVo log) { form.lyr1().tabLog().txtLogContent().setValue(log.getLogContent()); form.lyr1().tabLog().txtLogLocation().setValue(log.getLocation()); form.lyr1().tabLog().txtlogName().setValue(log.getFileName()); form.lyr1().tabLog().intLogSize().setValue(log.getSize()); }
public LogFileVo getLogFile(AppSessionVo vo, Integer tailSize) throws DomainInterfaceException { LogFileVo ret = new LogFileVo(); ret.setLocation(ConfigFlag.GEN.SESSION_LOG_LOCATION.getValue()); String logFileName = "Ims_" + vo.getUsername() + "_" + vo.getSessionId() + ".log"; ret.setLogContent(getLogFileContent(logFileName,tailSize.intValue())); ret.setFileName(logFileName); ret.setSize(Integer.valueOf(getLogFileSize(logFileName))); return ret; }