private String printMessage(String type, String file) {
    String message = null;
    try {
      message = FileUtils.readFileToString(new File(file), Charset.defaultCharset()).trim();
      LOG.info("    Advisor script {}: {}", type, message);
    } catch (IOException io) {
      LOG.error("Error in reading script log files", io);
    }
    return message;
  }
Logs messages from the output/error file.
@param type Severity type, stdout or stderr
@param file File path
@return File to a String
ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRunner.java