public static String getLiveLogsURLForContainer(Container c) { if (c == null) { return null; } String user = null; try { user = SliderUtils.getCurrentUser().getShortUserName(); } catch (IOException ignored) { } String liveLogsUrl = ""; if (user != null) { liveLogsUrl = "http://" + c.getNodeHttpAddress() + "/node/containerlogs/" + c.getId() + "/" + user; } log.info("Live log link = {}", liveLogsUrl); return liveLogsUrl; }
public static String getLiveLogsURLForContainer(Container c) { if (c == null) { return null; } String user = null; try { user = SliderUtils.getCurrentUser().getShortUserName(); } catch (IOException ignored) { } String liveLogsUrl = ""; if (user != null) { liveLogsUrl = "http://" + c.getNodeHttpAddress() + "/node/containerlogs/" + c.getId() + "/" + user; } log.info("Live log link = {}", liveLogsUrl); return liveLogsUrl; }
/** * Get the URL log for a container * @param c container * @return the URL or "" if it cannot be determined */ public static String getLogsURLForContainer(Container c) { if (c==null) { return null; } String user = null; try { user = SliderUtils.getCurrentUser().getShortUserName(); } catch (IOException ignored) { } String completedLogsUrl = ""; String url = logServerURL; if (user != null && SliderUtils.isSet(url)) { completedLogsUrl = url + "/" + c.getNodeId() + "/" + c.getId() + "/ctx/" + user; } log.info("Completed log link = {}", completedLogsUrl); return completedLogsUrl; }
/** * Get the URL log for a container * @param c container * @return the URL or "" if it cannot be determined */ public static String getLogsURLForContainer(Container c) { if (c==null) { return null; } String user = null; try { user = SliderUtils.getCurrentUser().getShortUserName(); } catch (IOException ignored) { } String completedLogsUrl = ""; String url = logServerURL; if (user != null && SliderUtils.isSet(url)) { completedLogsUrl = url + "/" + c.getNodeId() + "/" + c.getId() + "/ctx/" + user; } log.info("Completed log link = {}", completedLogsUrl); return completedLogsUrl; }