Writes the logging output, applying filters and decorations. The
Qualog
class offers a much cleaner and more thorough interface
than this class.
NO_OUTPUT
public static final int NO_OUTPUT
QUIET
public static final int QUIET
VERBOSE
public static final int VERBOSE
classWidth
public int classWidth
classesSkipped
public List classesSkipped
columns
public boolean columns
fileWidth
public int fileWidth
functionWidth
public int functionWidth
lineWidth
public int lineWidth
methodsSkipped
public List methodsSkipped
out
public PrintWriter out
packagesSkipped
public List packagesSkipped
showClasses
public boolean showClasses
showFiles
public boolean showFiles
addClassSkipped
public void addClassSkipped(Class cls)
addClassSkipped
public void addClassSkipped(String clsName)
addFilter
public void addFilter(QlFilter filter)
Adds a filter to be applied for output.
appendPadded
protected void appendPadded(StringBuffer buf,
String str,
int maxSize)
clear
public void clear()
Resets parameters to their defaults.
clearClassColor
public void clearClassColor(String className)
findStackStart
public int findStackStart(StackTraceElement[] stack)
Returns the index in the stack where logging (stacks) should be
displayed. Returns -1 if the end of the stack is reached and no logging
should occur.
getStack
protected StackTraceElement[] getStack(int depth)
isLoggable
public boolean isLoggable(QlLevel level)
isSkipped
public boolean isSkipped(StackTraceElement ste)
objectToString
protected String objectToString(Object obj)
outputClassAndMethod
protected void outputClassAndMethod(StringBuffer buf,
ANSIColor classColor,
ANSIColor methodColor,
StackTraceElement stackElement)
outputFileName
protected void outputFileName(StringBuffer buf,
ANSIColor fileColor,
StackTraceElement stackElement)
outputMessage
protected void outputMessage(StringBuffer buf,
int framesShown,
ANSIColor[] msgColor,
String msg,
StackTraceElement stackElement)
repeat
protected StringBuffer repeat(StringBuffer buf,
int len,
char ch)
repeat
protected String repeat(int len,
char ch)
set
public void set(boolean columns,
int fileWidth,
int lineWidth,
int classWidth,
int functionWidth)
setClassColor
public void setClassColor(String className,
ANSIColor color)
setColumns
public void setColumns(boolean cols)
setDisabled
public void setDisabled(Class cls)
setFileColor
public void setFileColor(String fileName,
ANSIColor color)
setMethodColor
public void setMethodColor(String className,
String methodName,
ANSIColor color)
setOutput
public void setOutput(int type,
QlLevel level)
Sets the output type and level. Either verbose or quiet can be enabled.
setPackageColor
public void setPackageColor(String pkg,
ANSIColor color)
verbose
public boolean verbose()