Package ch.qos.logback.core.util
Class StatusPrinter
- java.lang.Object
-
- ch.qos.logback.core.util.StatusPrinter
-
public class StatusPrinter extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static CachingDateFormattercachingDateFormatprivate static java.io.PrintStreamps
-
Constructor Summary
Constructors Constructor Description StatusPrinter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static voidappendThrowable(java.lang.StringBuilder sb, java.lang.Throwable t)static voidbuildStr(java.lang.StringBuilder sb, java.lang.String indentation, Status s)private static voidbuildStrFromStatusList(java.lang.StringBuilder sb, java.util.List<Status> statusList)static voidprint(Context context)Print the contents of the context's status data.static voidprint(Context context, long threshold)Print context's status data with a timestamp higher than the threshold.static voidprint(StatusManager sm)static voidprint(StatusManager sm, long threshold)static voidprint(java.util.List<Status> statusList)static voidprintIfErrorsOccured(Context context)Print the contents of the context statuses, but only if they contain errors.static voidprintInCaseOfErrorsOrWarnings(Context context)Print the contents of the context statuses, but only if they contain warnings or errors.static voidprintInCaseOfErrorsOrWarnings(Context context, long threshold)Print the contents of the context status, but only if they contain warnings or errors occurring later then the threshold.static voidsetPrintStream(java.io.PrintStream printStream)
-
-
-
Field Detail
-
ps
private static java.io.PrintStream ps
-
cachingDateFormat
static CachingDateFormatter cachingDateFormat
-
-
Method Detail
-
setPrintStream
public static void setPrintStream(java.io.PrintStream printStream)
-
printInCaseOfErrorsOrWarnings
public static void printInCaseOfErrorsOrWarnings(Context context)
Print the contents of the context statuses, but only if they contain warnings or errors.- Parameters:
context-
-
printInCaseOfErrorsOrWarnings
public static void printInCaseOfErrorsOrWarnings(Context context, long threshold)
Print the contents of the context status, but only if they contain warnings or errors occurring later then the threshold.- Parameters:
context-
-
printIfErrorsOccured
public static void printIfErrorsOccured(Context context)
Print the contents of the context statuses, but only if they contain errors.- Parameters:
context-
-
print
public static void print(Context context)
Print the contents of the context's status data.- Parameters:
context-
-
print
public static void print(Context context, long threshold)
Print context's status data with a timestamp higher than the threshold.- Parameters:
context-
-
print
public static void print(StatusManager sm)
-
print
public static void print(StatusManager sm, long threshold)
-
print
public static void print(java.util.List<Status> statusList)
-
buildStrFromStatusList
private static void buildStrFromStatusList(java.lang.StringBuilder sb, java.util.List<Status> statusList)
-
appendThrowable
private static void appendThrowable(java.lang.StringBuilder sb, java.lang.Throwable t)
-
buildStr
public static void buildStr(java.lang.StringBuilder sb, java.lang.String indentation, Status s)
-
-