- java.lang.Object
-
- ch.qos.logback.core.status.StatusUtil
-
public class StatusUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description StatusUtil(Context context)StatusUtil(StatusManager sm)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddError(Object caller, String msg, Throwable t)voidaddInfo(Object caller, String msg)voidaddStatus(Status status)voidaddWarn(Object caller, String msg)booleancontainsException(Class<?> exceptionType)booleancontainsException(Class<?> exceptionType, String msgRegex)booleancontainsMatch(int level, String regex)booleancontainsMatch(long threshold, int level, String regex)booleancontainsMatch(String regex)static booleancontextHasStatusListener(Context context)Returns true if the StatusManager associated with the context passed as parameter has one or more StatusListener instances registered.static Stringdiff(Status left, Status right)static List<Status>filterStatusListByTimeThreshold(List<Status> rawList, long threshold)intgetHighestLevel(long threshold)booleanhasXMLParsingErrors(long threshold)booleanisErrorFree(long threshold)booleanisWarningOrErrorFree(long threshold)intlevelCount(int level, long threshold)intmatchCount(String regex)booleannoXMLParsingErrorsOccurred(long threshold)longtimeOfLastReset()Return the time of last reset. -1 if last reset time could not be found
-
-
-
Constructor Detail
-
StatusUtil
public StatusUtil(StatusManager sm)
-
StatusUtil
public StatusUtil(Context context)
-
-
Method Detail
-
contextHasStatusListener
public static boolean contextHasStatusListener(Context context)
Returns true if the StatusManager associated with the context passed as parameter has one or more StatusListener instances registered. Returns false otherwise.- Parameters:
context-- Returns:
- true if one or more StatusListeners registered, false otherwise
- Since:
- 1.0.8
-
filterStatusListByTimeThreshold
public static List<Status> filterStatusListByTimeThreshold(List<Status> rawList, long threshold)
-
hasXMLParsingErrors
public boolean hasXMLParsingErrors(long threshold)
-
noXMLParsingErrorsOccurred
public boolean noXMLParsingErrorsOccurred(long threshold)
-
getHighestLevel
public int getHighestLevel(long threshold)
-
isErrorFree
public boolean isErrorFree(long threshold)
-
isWarningOrErrorFree
public boolean isWarningOrErrorFree(long threshold)
-
containsMatch
public boolean containsMatch(long threshold, int level, String regex)
-
containsMatch
public boolean containsMatch(int level, String regex)
-
containsMatch
public boolean containsMatch(String regex)
-
levelCount
public int levelCount(int level, long threshold)
-
matchCount
public int matchCount(String regex)
-
containsException
public boolean containsException(Class<?> exceptionType)
-
containsException
public boolean containsException(Class<?> exceptionType, String msgRegex)
-
timeOfLastReset
public long timeOfLastReset()
Return the time of last reset. -1 if last reset time could not be found- Returns:
- time of last reset or -1
-
-