public String getLog() {
    File childLogFile = loggingSession.getLogFile().isPresent()
        ? loggingSession.getLogFile().get().getChildLogFile() : null;
    String childTail = tailFile(childLogFile);
    String mainTail = tailFile(new File(agentConfig.getLogFile()));
    if (childTail == null && mainTail == null) {
      return "No log file configured, log messages will be directed to stdout.";
    } else {
      StringBuilder result = new StringBuilder();
      if (mainTail != null) {
        result.append(mainTail);
      }
      if (childTail != null) {
        result
            .append("\n" + "-------------------- tail of child log --------------------" + "\n");
        result.append(childTail);
      }
      return result.toString();
    }
  }
Retrieves a displayable snapshot of this Agent's log.

@return snapshot of the current log
geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentImpl.java