Top Fields Constructors Methods
ch.qos.logback.core.status

public Class StatusUtil

extends Object
Class Inheritance
Imports
ch.qos.logback.core.Context, .CoreConstants, java.util.ArrayList, .List, .Objects, java.util.regex.Matcher, .Pattern

Field Summary

Modifier and TypeField and Description
pack-priv StatusManager

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
addError(Object caller, String msg, Throwable t)

public void
addInfo(Object caller, String msg)

public void
addStatus(Status status)

public void
addWarn(Object caller, String msg)

private boolean
checkRegexMatch(String message, String msgRegex)

public boolean
containsException(Class<?> exceptionType)

public boolean
containsException(Class<?> exceptionType, String msgRegex)

public boolean
containsMatch(long threshold, int level, String regex)

public boolean
containsMatch(int level, String regex)

public boolean
public static boolean

Returns:

true if one or more StatusListeners registered, false otherwise
contextHasStatusListener
(Context context)

Returns true if the StatusManager associated with the context passed as parameter has one or more StatusListener instances registered.

public static String
diff(Status left, Status right)

public static List<Status>
filterStatusListByTimeThreshold(List<Status> rawList, long threshold)

public int
getHighestLevel(long threshold)

public boolean
hasXMLParsingErrors(long threshold)

public boolean
isErrorFree(long threshold)

public boolean
isWarningOrErrorFree(long threshold)

public int
levelCount(int level, long threshold)

public int
public boolean
public long

Returns:

time of last reset or -1
timeOfLastReset
()

Return the time of last reset.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

smback to summary
pack-priv StatusManager sm

Constructor Detail

StatusUtilback to summary
public StatusUtil(StatusManager sm)
StatusUtilback to summary
public StatusUtil(Context context)

Method Detail

addErrorback to summary
public void addError(Object caller, String msg, Throwable t)
addInfoback to summary
public void addInfo(Object caller, String msg)
addStatusback to summary
public void addStatus(Status status)
addWarnback to summary
public void addWarn(Object caller, String msg)
checkRegexMatchback to summary
private boolean checkRegexMatch(String message, String msgRegex)
containsExceptionback to summary
public boolean containsException(Class<?> exceptionType)
containsExceptionback to summary
public boolean containsException(Class<?> exceptionType, String msgRegex)
containsMatchback to summary
public boolean containsMatch(long threshold, int level, String regex)
containsMatchback to summary
public boolean containsMatch(int level, String regex)
containsMatchback to summary
public boolean containsMatch(String regex)
contextHasStatusListenerback to summary
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.

Returns:boolean

true if one or more StatusListeners registered, false otherwise

Since
1.0.8
diffback to summary
public static String diff(Status left, Status right)
filterStatusListByTimeThresholdback to summary
public static List<Status> filterStatusListByTimeThreshold(List<Status> rawList, long threshold)
getHighestLevelback to summary
public int getHighestLevel(long threshold)
hasXMLParsingErrorsback to summary
public boolean hasXMLParsingErrors(long threshold)
isErrorFreeback to summary
public boolean isErrorFree(long threshold)
isWarningOrErrorFreeback to summary
public boolean isWarningOrErrorFree(long threshold)
levelCountback to summary
public int levelCount(int level, long threshold)
matchCountback to summary
public int matchCount(String regex)
noXMLParsingErrorsOccurredback to summary
public boolean noXMLParsingErrorsOccurred(long threshold)
timeOfLastResetback to summary
public long timeOfLastReset()

Return the time of last reset. -1 if last reset time could not be found

Returns:long

time of last reset or -1