ch.qos.logback.core.status

## Class StatusUtil

- java.lang.Object
- - ch.qos.logback.core.status.StatusUtil

    public class StatusUtil
    extends Object

### Constructor Summary

Constructors
Constructor and Description
`StatusUtil(Context context)`
`StatusUtil(StatusManager sm)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `addError(Object caller, String msg, Throwable t)`
`void` `addInfo(Object caller, String msg)`
`void` `addStatus(Status status)`
`void` `addWarn(Object caller, String msg)`
`boolean` `containsException(Class<?> exceptionType)`
`boolean` `containsMatch(int level, String regex)`
`boolean` `containsMatch(long threshold, int level, String regex)`
`boolean` `containsMatch(String regex)`
`static boolean` `contextHasStatusListener(Context context)` Returns true if the StatusManager associated with the context passed as parameter has one or more StatusListener instances registered.
`static List<Status>` `filterStatusListByTimeThreshold(List<Status> rawList, long threshold)`
`int` `getHighestLevel(long threshold)`
`boolean` `hasXMLParsingErrors(long threshold)`
`boolean` `isErrorFree(long threshold)`
`boolean` `isWarningOrErrorFree(long threshold)`
`int` `matchCount(String regex)`
`boolean` `noXMLParsingErrorsOccurred(long threshold)`
`long` `timeOfLastReset()` Return the time of last reset.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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)

#### addStatus

    public void addStatus(Status status)

#### addInfo

    public void addInfo(Object caller,
                        String msg)

#### addWarn

    public void addWarn(Object caller,
                        String msg)

#### addError

    public void addError(Object caller,
                         String msg,
                         Throwable t)

#### 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)

#### matchCount

    public int matchCount(String regex)

#### containsException

    public boolean containsException(Class<?> exceptionType)

#### 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