QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
LogEntry Struct Reference

#include <LogEntry.h>

Public Types

enum  Role {
  TimestampRole = Qt::UserRole + 1 , LevelRole , LevelLabelRole , CategoryRole ,
  MessageRole , FormattedRole , FileRole , FunctionRole ,
  LineRole , ThreadIdRole
}
 
enum  Column {
  TimestampColumn = 0 , LevelColumn , CategoryColumn , SourceColumn ,
  MessageColumn , ColumnCount
}
 

Public Member Functions

QML_ANONYMOUS(QDateTime timestamp MEMBER timestamp FINAL) 1(Level level MEMBER level FINAL) 1(QString category MEMBER category FINAL) 1(QString message MEMBER message FINAL) 1(QString file MEMBER file FINAL) 1(QString function MEMBER function FINAL) 1(QString formatted MEMBER formatted FINAL) 1(int line MEMBER line FINAL) public LogEntry ()=default
 
 LogEntry (const LogEntry &)=default
 
 LogEntry (LogEntry &&) noexcept=default
 
LogEntryoperator= (const LogEntry &)=default
 
LogEntryoperator= (LogEntry &&) noexcept=default
 
QString levelLabel () const
 
void buildFormatted ()
 
QVariant roleData (int role) const
 
QVariant columnDisplayData (int column) const
 

Static Public Member Functions

static Level fromQtMsgType (QtMsgType type)
 
static QHash< int, QByteArray > roleNames ()
 
static QVariant columnHeaderData (int section)
 

Public Attributes

QDateTime timestamp
 
Level level = Debug
 
QString category
 
QString message
 
QString file
 
QString function
 
QString formatted
 
Qt::HANDLE threadId = nullptr
 
int line = 0
 

Detailed Description

Definition at line 7 of file LogEntry.h.

Member Enumeration Documentation

◆ Column

Enumerator
TimestampColumn 
LevelColumn 
CategoryColumn 
SourceColumn 
MessageColumn 
ColumnCount 

Definition at line 66 of file LogEntry.h.

◆ Role

Enumerator
TimestampRole 
LevelRole 
LevelLabelRole 
CategoryRole 
MessageRole 
FormattedRole 
FileRole 
FunctionRole 
LineRole 
ThreadIdRole 

Definition at line 52 of file LogEntry.h.

Constructor & Destructor Documentation

◆ LogEntry() [1/3]

QML_ANONYMOUS(QDateTime timestamp MEMBER timestamp FINAL) 1(Level level MEMBER level FINAL) 1(QString category MEMBER category FINAL) 1(QString message MEMBER message FINAL) 1(QString file MEMBER file FINAL) 1(QString function MEMBER function FINAL) 1(QString formatted MEMBER formatted FINAL) 1(int line MEMBER line FINAL) public LogEntry::LogEntry ( )
default

◆ LogEntry() [2/3]

LogEntry::LogEntry ( const LogEntry )
default

◆ LogEntry() [3/3]

LogEntry::LogEntry ( LogEntry &&  )
defaultnoexcept

Member Function Documentation

◆ buildFormatted()

void LogEntry::buildFormatted ( )

Definition at line 23 of file LogEntry.cc.

References category, formatted, levelLabel(), message, and timestamp.

◆ columnDisplayData()

QVariant LogEntry::columnDisplayData ( int  column) const

◆ columnHeaderData()

QVariant LogEntry::columnHeaderData ( int  section)
static

◆ fromQtMsgType()

LogEntry::Level LogEntry::fromQtMsgType ( QtMsgType  type)
static

Definition at line 29 of file LogEntry.cc.

◆ levelLabel()

QString LogEntry::levelLabel ( ) const

◆ operator=() [1/2]

LogEntry & LogEntry::operator= ( const LogEntry )
default

◆ operator=() [2/2]

LogEntry & LogEntry::operator= ( LogEntry &&  )
defaultnoexcept

◆ roleData()

◆ roleNames()

QHash< int, QByteArray > LogEntry::roleNames ( )
static

Member Data Documentation

◆ category

QString LogEntry::category

◆ file

QString LogEntry::file

Definition at line 41 of file LogEntry.h.

Referenced by columnDisplayData(), and roleData().

◆ formatted

QString LogEntry::formatted

Definition at line 43 of file LogEntry.h.

Referenced by buildFormatted(), and roleData().

◆ function

QString LogEntry::function

Definition at line 42 of file LogEntry.h.

Referenced by roleData().

◆ level

Level LogEntry::level = Debug

Definition at line 38 of file LogEntry.h.

Referenced by LogFormatter::entryToJson(), levelLabel(), and roleData().

◆ line

int LogEntry::line = 0

Definition at line 45 of file LogEntry.h.

Referenced by columnDisplayData(), and roleData().

◆ message

QString LogEntry::message

◆ threadId

Qt::HANDLE LogEntry::threadId = nullptr

Definition at line 44 of file LogEntry.h.

Referenced by roleData().

◆ timestamp

QDateTime LogEntry::timestamp

The documentation for this struct was generated from the following files: