|
JBoss Log Manager 1.4.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.logmanager.formatters.Formatters
public final class Formatters
Formatter utility methods.
| Method Summary | |
|---|---|
static FormatStep |
classNameFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth,
int count)
Create a format step which emits the source class name with the given justification rules (NOTE: call stack introspection introduces a significant performance penalty). |
static FormatStep |
dateFormatStep(String formatString,
boolean leftJustify,
int minimumWidth,
int maximumWidth)
Create a format step which emits the date of the log record with the given justification rules. |
static FormatStep |
dateFormatStep(TimeZone timeZone,
String formatString,
boolean leftJustify,
int minimumWidth,
int maximumWidth)
Create a format step which emits the date of the log record with the given justification rules. |
static FormatStep |
exceptionFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth,
boolean extended)
Create a format step which emits the stack trace of an exception with the given justification rules. |
static FormatStep |
fileNameFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
Create a format step which emits the source file name with the given justification rules (NOTE: call stack introspection introduces a significant performance penalty). |
static FormatStep |
formatColor(ColorMap colors,
String color)
|
static FormatStep |
levelFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
Create a format step which emits the log level name. |
static FormatStep |
lineNumberFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
Create a format step which emits the source file line number with the given justification rules (NOTE: call stack introspection introduces a significant performance penalty). |
static FormatStep |
lineSeparatorFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
Create a format step which emits the platform line separator. |
static FormatStep |
localizedLevelFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
Create a format step which emits the localized log level name. |
static FormatStep |
locationInformationFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
Create a format step which emits the complete source location information with the given justification rules (NOTE: call stack introspection introduces a significant performance penalty). |
static FormatStep |
loggerNameFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth,
int count)
Create a format step which emits the logger name with the given justification rules. |
static FormatStep |
mdcFormatStep(String key,
boolean leftJustify,
int minimumWidth,
int maximumWidth)
Create a format step which emits the MDC value associated with the given key of the log record. |
static FormatStep |
messageFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
Create a format step which emits the formatted log message text with the given justification rules. |
static FormatStep |
methodNameFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
Create a format step which emits the source method name with the given justification rules (NOTE: call stack introspection introduces a significant performance penalty). |
static FormatStep |
ndcFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
Create a format step which emits the NDC value of the log record. |
static FormatStep |
ndcFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth,
int count)
Create a format step which emits the NDC value of the log record. |
static Formatter |
nullFormatter()
Get the null formatter, which outputs nothing. |
static FormatStep |
relativeTimeFormatStep(long baseTime,
boolean leftJustify,
int minimumWidth,
int maximumWidth)
Create a format step which emits the number of milliseconds since the given base time. |
static FormatStep |
resourceKeyFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
Create a format step which emits the log message resource key (if any) with the given justification rules. |
static FormatStep |
simpleMessageFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
Create a format step which emits the formatted log message text (simple version, no exception traces) with the given justification rules. |
static FormatStep |
textFormatStep(String string)
Create a format step which simply emits the given string. |
static FormatStep |
threadNameFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
Create a format step which emits the name of the thread which originated the log record. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Formatter nullFormatter()
public static FormatStep textFormatStep(String string)
string - the string to emit
public static FormatStep loggerNameFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth,
int count)
leftJustify - true to left justify, false to right justifyminimumWidth - the minimum field width, or 0 for nonemaximumWidth - the maximum field width (must be greater than minimumFieldWidth), or 0 for nonecount - the maximum number of logger name segments to emit (counting from the right)
public static FormatStep classNameFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth,
int count)
leftJustify - true to left justify, false to right justifyminimumWidth - the minimum field width, or 0 for nonemaximumWidth - the maximum field width (must be greater than minimumFieldWidth), or 0 for nonecount - the maximum number of class name segments to emit (counting from the right)
public static FormatStep dateFormatStep(TimeZone timeZone,
String formatString,
boolean leftJustify,
int minimumWidth,
int maximumWidth)
timeZone - the time zone to format toformatString - the date format stringleftJustify - true to left justify, false to right justifyminimumWidth - the minimum field width, or 0 for nonemaximumWidth - the maximum field width (must be greater than minimumFieldWidth), or 0 for none
public static FormatStep dateFormatStep(String formatString,
boolean leftJustify,
int minimumWidth,
int maximumWidth)
formatString - the date format stringleftJustify - true to left justify, false to right justifyminimumWidth - the minimum field width, or 0 for nonemaximumWidth - the maximum field width (must be greater than minimumFieldWidth), or 0 for none
public static FormatStep fileNameFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
leftJustify - true to left justify, false to right justifyminimumWidth - the minimum field width, or 0 for nonemaximumWidth - the maximum field width (must be greater than minimumFieldWidth), or 0 for none
public static FormatStep locationInformationFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
leftJustify - true to left justify, false to right justifyminimumWidth - the minimum field width, or 0 for nonemaximumWidth - the maximum field width (must be greater than minimumFieldWidth), or 0 for none
public static FormatStep lineNumberFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
leftJustify - true to left justify, false to right justifyminimumWidth - the minimum field width, or 0 for nonemaximumWidth - the maximum field width (must be greater than minimumFieldWidth), or 0 for none
public static FormatStep messageFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
leftJustify - true to left justify, false to right justifyminimumWidth - the minimum field width, or 0 for nonemaximumWidth - the maximum field width (must be greater than minimumFieldWidth), or 0 for none
public static FormatStep simpleMessageFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
leftJustify - true to left justify, false to right justifyminimumWidth - the minimum field width, or 0 for nonemaximumWidth - the maximum field width (must be greater than minimumFieldWidth), or 0 for none
public static FormatStep exceptionFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth,
boolean extended)
leftJustify - true to left justify, false to right justifyminimumWidth - the minimum field width, or 0 for nonemaximumWidth - the maximum field width (must be greater than minimumFieldWidth), or 0 for noneextended - true if the stack trace should attempt to include extended JAR version information
public static FormatStep resourceKeyFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
leftJustify - true to left justify, false to right justifyminimumWidth - the minimum field width, or 0 for nonemaximumWidth - the maximum field width (must be greater than minimumFieldWidth), or 0 for none
public static FormatStep methodNameFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
leftJustify - true to left justify, false to right justifyminimumWidth - the minimum field width, or 0 for nonemaximumWidth - the maximum field width (must be greater than minimumFieldWidth), or 0 for none
public static FormatStep lineSeparatorFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
leftJustify - true to left justify, false to right justifyminimumWidth - the minimum field width, or 0 for nonemaximumWidth - the maximum field width (must be greater than minimumFieldWidth), or 0 for none
public static FormatStep levelFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
leftJustify - true to left justify, false to right justifyminimumWidth - the minimum field width, or 0 for nonemaximumWidth - the maximum field width (must be greater than minimumFieldWidth), or 0 for none
public static FormatStep localizedLevelFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
leftJustify - true to left justify, false to right justifyminimumWidth - the minimum field width, or 0 for nonemaximumWidth - the maximum field width (must be greater than minimumFieldWidth), or 0 for none
public static FormatStep relativeTimeFormatStep(long baseTime,
boolean leftJustify,
int minimumWidth,
int maximumWidth)
baseTime - the base time as milliseconds as per System.currentTimeMillis()leftJustify - true to left justify, false to right justifyminimumWidth - the minimum field width, or 0 for nonemaximumWidth - the maximum field width (must be greater than minimumFieldWidth), or 0 for none
public static FormatStep threadNameFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
leftJustify - true to left justify, false to right justifyminimumWidth - the minimum field width, or 0 for nonemaximumWidth - the maximum field width (must be greater than minimumFieldWidth), or 0 for none
public static FormatStep ndcFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth)
leftJustify - true to left justify, false to right justifyminimumWidth - the minimum field width, or 0 for nonemaximumWidth - the maximum field width (must be greater than minimumFieldWidth), or 0 for none
public static FormatStep ndcFormatStep(boolean leftJustify,
int minimumWidth,
int maximumWidth,
int count)
leftJustify - true to left justify, false to right justifyminimumWidth - the minimum field width, or 0 for nonemaximumWidth - the maximum field width (must be greater than minimumFieldWidth), or 0 for nonecount - the limit to the number of segments to format
public static FormatStep mdcFormatStep(String key,
boolean leftJustify,
int minimumWidth,
int maximumWidth)
leftJustify - true to left justify, false to right justifyminimumWidth - the minimum field width, or 0 for nonemaximumWidth - the maximum field width (must be greater than minimumFieldWidth), or 0 for none
public static FormatStep formatColor(ColorMap colors,
String color)
|
JBoss Log Manager 1.4.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||