org.apache.hadoop.hive.ql.session
Class SessionState.LogHelper

java.lang.Object
  extended by org.apache.hadoop.hive.ql.session.SessionState.LogHelper
Enclosing class:
SessionState

public static class SessionState.LogHelper
extends Object

This class provides helper routines to emit informational and error messages to the user and log4j files while obeying the current session's verbosity levels. NEVER write directly to the SessionStates standard output other than to emit result data DO use printInfo and printError provided by LogHelper to emit non result data strings. It is perfectly acceptable to have global static LogHelper objects (for example - once per module) LogHelper always emits info/error to current session as required.


Field Summary
protected  boolean isSilent
           
protected  org.apache.commons.logging.Log LOG
           
 
Constructor Summary
SessionState.LogHelper(org.apache.commons.logging.Log LOG)
           
SessionState.LogHelper(org.apache.commons.logging.Log LOG, boolean isSilent)
           
 
Method Summary
 PrintStream getChildErrStream()
           
 PrintStream getChildOutStream()
           
 PrintStream getErrStream()
           
 PrintStream getInfoStream()
           
 boolean getIsSilent()
           
 PrintStream getOutStream()
           
 void printError(String error)
           
 void printError(String error, String detail)
           
 void printInfo(String info)
           
 void printInfo(String info, String detail)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected org.apache.commons.logging.Log LOG

isSilent

protected boolean isSilent
Constructor Detail

SessionState.LogHelper

public SessionState.LogHelper(org.apache.commons.logging.Log LOG)

SessionState.LogHelper

public SessionState.LogHelper(org.apache.commons.logging.Log LOG,
                              boolean isSilent)
Method Detail

getOutStream

public PrintStream getOutStream()

getInfoStream

public PrintStream getInfoStream()

getErrStream

public PrintStream getErrStream()

getChildOutStream

public PrintStream getChildOutStream()

getChildErrStream

public PrintStream getChildErrStream()

getIsSilent

public boolean getIsSilent()

printInfo

public void printInfo(String info)

printInfo

public void printInfo(String info,
                      String detail)

printError

public void printError(String error)

printError

public void printError(String error,
                       String detail)


Copyright © 2013 The Apache Software Foundation