/** * Logs an error into the log file, and into the HiveServer2 or HiveCli error stream too. * Handles an extra detail which will not be printed if null. * BeeLine uses the operation log file to show the logs to the user, so depending on the * BeeLine settings it could be shown to the user. * @param error The log message * @param detail Extra detail to log which will be not printed if null */ public void printError(String error, String detail) { getErrStream().println(error); LOG.error(error + StringUtils.defaultString(detail)); } }
public void printError(String error, String detail) { getErrStream().println(error); LOG.error(error + StringUtils.defaultString(detail)); } }
System.setOut(console.getErrStream());
public PrintStream getInfoStream() { SessionState ss = SessionState.get(); return ((ss != null) && (ss.info != null)) ? ss.info : getErrStream(); }
public void printError(String error, String detail) { getErrStream().println(error); LOG.error(error + StringUtils.defaultString(detail)); } }
public void printError(String error, String detail) { getErrStream().println(error); LOG.error(error + StringUtils.defaultString(detail)); } }
public void printInfo(String info, String detail) { if (!getIsSilent()) { getErrStream().println(info); } LOG.info(info + StringUtils.defaultString(detail)); }
System.setOut(console.getErrStream());
public static PrintStream getInfoStream() { SessionState ss = SessionState.get(); return ((ss != null) && (ss.info != null)) ? ss.info : getErrStream(); }
/** * Get the console info stream for HiveServer2 or HiveCli. * @return The info stream */ public static PrintStream getInfoStream() { SessionState ss = SessionState.get(); return ((ss != null) && (ss.info != null)) ? ss.info : getErrStream(); }