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