• LogEntry
  • LogEntry Class

    (nymeaserver::LogEntry)

    Represents an entry of the log database. More...

    Header: #include <LogEntry>

    Public Functions

    LogEntry(QDateTime timestamp, Logging::LoggingLevel level, Logging::LoggingSource source, int errorCode = 0)
    LogEntry(Logging::LoggingLevel level, Logging::LoggingSource source, int errorCode = 0)
    LogEntry(Logging::LoggingSource source)
    bool active() const
    DeviceId deviceId() const
    int errorCode() const
    Logging::LoggingEventType eventType() const
    Logging::LoggingLevel level() const
    void setActive(bool active)
    void setDeviceId(const DeviceId & deviceId)
    void setEventType(const Logging::LoggingEventType & eventType)
    void setTypeId(const QUuid & typeId)
    void setValue(const QVariant & value)
    Logging::LoggingSource source() const
    QDateTime timestamp() const
    QUuid typeId() const
    QVariant value() const

    Detailed Description

    Represents an entry of the log database.

    A LogEntry represents an a nymea event which can be stored from the LogEngine to the database. Each LogEntry has a timestamp an can be loaded from the database and stored in the database.

    See also LogEngine, LogFilter, LogsResource, and LoggingHandler.

    Member Function Documentation

    LogEntry::LogEntry(QDateTime timestamp, Logging::LoggingLevel level, Logging::LoggingSource source, int errorCode = 0)

    Constructs a LogEntry with the given timestamp, level, source and errorCode.

    LogEntry::LogEntry(Logging::LoggingLevel level, Logging::LoggingSource source, int errorCode = 0)

    Constructs a LogEntry with the given level, source and errorCode.

    LogEntry::LogEntry(Logging::LoggingSource source)

    Constructs a LogEntry with the given source.

    bool LogEntry::active() const

    Returns true if this LogEntry is a system active type.

    See also setActive().

    DeviceId LogEntry::deviceId() const

    Returns the deviceId of this LogEntry.

    See also setDeviceId().

    int LogEntry::errorCode() const

    Returns the error code of this LogEntry.

    Logging::LoggingEventType LogEntry::eventType() const

    Returns the event type of this LogEntry.

    See also setEventType().

    Logging::LoggingLevel LogEntry::level() const

    Returns the level of this LogEntry.

    void LogEntry::setActive(bool active)

    Sets this LogEntry to active.

    See also active().

    void LogEntry::setDeviceId(const DeviceId & deviceId)

    Sets the deviceId of this LogEntry.

    See also deviceId().

    void LogEntry::setEventType(const Logging::LoggingEventType & eventType)

    Sets the eventType of this LogEntry.

    See also eventType().

    void LogEntry::setTypeId(const QUuid & typeId)

    Sets the typeId of this LogEntry.

    See also typeId().

    void LogEntry::setValue(const QVariant & value)

    Sets the value of this LogEntry.

    See also value().

    Logging::LoggingSource LogEntry::source() const

    Returns the source of this LogEntry.

    QDateTime LogEntry::timestamp() const

    Returns the timestamp of this LogEntry.

    QUuid LogEntry::typeId() const

    Returns the type ID of this LogEntry.

    See also setTypeId().

    QVariant LogEntry::value() const

    Returns the value of this LogEntry.

    See also setValue().