• LogFilter
  • LogFilter Class

    (nymeaserver::LogFilter)

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

    Header: #include <LogFilter>

    Public Functions

    LogFilter()
    void addDeviceId(const DeviceId & deviceId)
    void addLoggingEventType(const Logging::LoggingEventType & eventType)
    void addLoggingLevel(const Logging::LoggingLevel & level)
    void addLoggingSource(const Logging::LoggingSource & source)
    void addTimeFilter(const QDateTime & startDate = QDateTime(), const QDateTime & endDate = QDateTime())
    void addTypeId(const QUuid & typeId)
    void addValue(const QString & value)
    QList<DeviceId> deviceIds() const
    bool isEmpty() const
    int limit() const
    QList<Logging::LoggingEventType> loggingEventTypes() const
    QList<Logging::LoggingLevel> loggingLevels() const
    QList<Logging::LoggingSource> loggingSources() const
    int offset() const
    QString queryString() const
    void setLimit(int limit)
    void setOffset(int offset)
    QList<QPair<QDateTime, QDateTime> > timeFilters() const
    QList<QUuid> typeIds() const
    QList<QString> 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::addDeviceId(const DeviceId & deviceId)

    Add a new deviceId to this LogFilter.

    void LogFilter::addLoggingEventType(const Logging::LoggingEventType & eventType)

    Add a new eventType to this LogFilter.

    void LogFilter::addLoggingLevel(const Logging::LoggingLevel & level)

    Add a new level to this LogFilter.

    void LogFilter::addLoggingSource(const Logging::LoggingSource & source)

    Add a new source to this LogFilter.

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

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

    void LogFilter::addTypeId(const QUuid & typeId)

    Add a new typeId to this LogFilter.

    void LogFilter::addValue(const QString & value)

    Add a new value to this LogFilter.

    QList<DeviceId> LogFilter::deviceIds() const

    Returns the list of device id's from 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.

    QList<Logging::LoggingEventType> LogFilter::loggingEventTypes() const

    Returns the list of event types from this LogFilter.

    QList<Logging::LoggingLevel> LogFilter::loggingLevels() const

    Returns the list of logging levels from this LogFilter.

    QList<Logging::LoggingSource> 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.

    QString 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().

    QList<QPair<QDateTime, QDateTime> > LogFilter::timeFilters() const

    Returns the list of time filters from this LogFilter.

    QList<QUuid> LogFilter::typeIds() const

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

    QList<QString> LogFilter::values() const

    Returns the list of values from this LogFilter.