• LogFilter
  • LogFilter Class

    (nymeaserver::LogFilter)

    Represents a filter to access the logging databse. More...

    Header: #include <LogFilter>

    Public Functions

    LogFilter()
    void addLoggingEventType(const int &eventType)
    void addLoggingLevel(const int &level)
    void addLoggingSource(const int &source)
    void addThingId(const int &thingId)
    void addTimeFilter(const int &startDate = ..., const int &endDate = ...)
    void addTypeId(const int &typeId)
    void addValue(const int &value)
    bool isEmpty() const
    int limit() const
    int loggingEventTypes() const
    int loggingLevels() const
    int loggingSources() const
    int offset() const
    int queryString() const
    void setLimit(int limit)
    void setOffset(int offset)
    int thingIds() const
    int typeIds() const
    int values() const

    Detailed Description

    Represents a filter to access the logging databse.

    A LogFilter can be used to get LogEntries from the LogEngine matching a certain pattern.

    See also LogEngine, LogEntry, LogsResource, and LoggingHandler.

    Member Function Documentation

    LogFilter::LogFilter()

    Constructs a new LogFilter.

    void LogFilter::addLoggingEventType(const int &eventType)

    Add a new eventType to this LogFilter.

    void LogFilter::addLoggingLevel(const int &level)

    Add a new level to this LogFilter.

    void LogFilter::addLoggingSource(const int &source)

    Add a new source to this LogFilter.

    void LogFilter::addThingId(const int &thingId)

    Add a new thingId to this LogFilter.

    void LogFilter::addTimeFilter(const int &startDate = ..., const int &endDate = ...)

    Add a new time filter with the given startDate and endDate.

    void LogFilter::addTypeId(const int &typeId)

    Add a new typeId to this LogFilter.

    void LogFilter::addValue(const int &value)

    Add a new value to this LogFilter.

    bool LogFilter::isEmpty() const

    Returns true if this LogFilter is empty.

    int LogFilter::limit() const

    Returns the maximum count for the result set.

    See also setLimit() and setOffset.

    int LogFilter::loggingEventTypes() const

    Returns the list of event types from this LogFilter.

    int LogFilter::loggingLevels() const

    Returns the list of logging levels from this LogFilter.

    int LogFilter::loggingSources() const

    Returns the list of logging sources from this LogFilter.

    int LogFilter::offset() const

    Returns the offset for the result set.

    See also setOffset.

    int LogFilter::queryString() const

    Returns the database query string for this LogFilter.

    void LogFilter::setLimit(int limit)

    Set the maximum count for the result set. Unless a offset is specified, the newest count entries will be returned.

    See also limit() and setOffset.

    void LogFilter::setOffset(int offset)

    Set the offset for the result set. The offset starts at the newest entry in the result set. 0 (default) means "all items" Example: If the specified filter returns a total amount of 100 entries: - a offset value of 10 would include the oldest 90 entries - a offset value of 0 would return all 100 entries

    The offset is particularly useful in combination with the limit property and can be used for pagination.

    E.g. A result set of 10000 entries can be fetched in batches of 1000 entries by fetching 1) offset 0, limit 1000: Entries 0 to 9999 2) offset 10000, limit 1000: Entries 10000 - 19999 3) offset 20000, limit 1000: Entries 20000 - 29999 ...

    See also offset().

    int LogFilter::thingIds() const

    Returns the list of thing id's from this LogFilter.

    int LogFilter::typeIds() const

    Returns the list of type id's from this LogFilter.

    int LogFilter::values() const

    Returns the list of values from this LogFilter.