The logging items that are generated by LOG() and are sent to the console.
More...
#include <libmythbase/logging.h>
The logging items that are generated by LOG() and are sent to the console.
Definition at line 54 of file logging.h.
◆ LoggingItem() [1/2]
| LoggingItem::LoggingItem |
( |
| ) |
|
|
inlineprivate |
◆ LoggingItem() [2/2]
| LoggingItem::LoggingItem |
( |
const char * |
_file, |
|
|
const char * |
_function, |
|
|
int |
_line, |
|
|
LogLevel_t |
_level, |
|
|
LoggingType |
_type |
|
) |
| |
|
private |
◆ appName()
| QString LoggingItem::appName |
( |
| ) |
const |
|
inline |
◆ create()
| LoggingItem * LoggingItem::create |
( |
const char * |
_file, |
|
|
const char * |
_function, |
|
|
int |
_line, |
|
|
LogLevel_t |
_level, |
|
|
LoggingType |
_type |
|
) |
| |
|
static |
Create a new LoggingItem.
- Parameters
-
| _file | filename of the source file where the log message is from |
| _function | source function where the log message is from |
| _line | line number in the source where the log message is from |
| _level | logging level of the message (LogLevel_t) |
| _type | type of logging message |
- Returns
- LoggingItem that was created
Definition at line 519 of file logging.cpp.
Referenced by loggingDeregisterThread(), and loggingRegisterThread().
◆ epoch()
| std::chrono::microseconds LoggingItem::epoch |
( |
| ) |
const |
|
inline |
◆ epochInt()
| qlonglong LoggingItem::epochInt |
( |
| ) |
const |
|
inline |
◆ facility()
| int LoggingItem::facility |
( |
| ) |
const |
|
inline |
◆ file()
| QString LoggingItem::file |
( |
| ) |
const |
|
inline |
◆ function()
| QString LoggingItem::function |
( |
| ) |
const |
|
inline |
◆ getLevelChar()
| char LoggingItem::getLevelChar |
( |
void |
| ) |
|
◆ getThreadName()
| QString LoggingItem::getThreadName |
( |
void |
| ) |
|
◆ getThreadTid()
| int64_t LoggingItem::getThreadTid |
( |
void |
| ) |
|
Get the thread ID of the thread that produced the LoggingItem.
- Returns
- Thread ID of the producing thread, cast to a 64-bit signed integer
- Note
- In different platforms, the actual value returned here will vary. The intention is to get a thread ID that will map well to what is shown in gdb.
Definition at line 153 of file logging.cpp.
Referenced by LoggerThread::handleItem().
◆ getTimestamp()
| QString LoggingItem::getTimestamp |
( |
const char * |
format = "yyyy-MM-dd HH:mm:ss" | ) |
const |
◆ getTimestampUs()
| QString LoggingItem::getTimestampUs |
( |
const char * |
format = "yyyy-MM-dd HH:mm:ss" | ) |
const |
◆ level()
| int LoggingItem::level |
( |
| ) |
const |
|
inline |
◆ line()
| int LoggingItem::line |
( |
| ) |
const |
|
inline |
◆ logFile()
| QString LoggingItem::logFile |
( |
| ) |
const |
|
inline |
◆ message()
| QString LoggingItem::message |
( |
| ) |
const |
|
inline |
◆ pid()
| int LoggingItem::pid |
( |
| ) |
const |
|
inline |
◆ Q_DISABLE_COPY()
◆ setAppName()
| void LoggingItem::setAppName |
( |
const QString & |
val | ) |
|
|
inline |
◆ setEpoch()
| void LoggingItem::setEpoch |
( |
std::chrono::microseconds |
val | ) |
|
|
inline |
◆ setEpochInt()
| void LoggingItem::setEpochInt |
( |
const qlonglong |
val | ) |
|
|
inline |
◆ setFacility()
| void LoggingItem::setFacility |
( |
const int |
val | ) |
|
|
inline |
◆ setFile()
| void LoggingItem::setFile |
( |
const QString & |
val | ) |
|
|
inline |
◆ setFunction()
| void LoggingItem::setFunction |
( |
const QString & |
val | ) |
|
|
inline |
◆ setLevel()
| void LoggingItem::setLevel |
( |
const int |
val | ) |
|
|
inline |
◆ setLine()
| void LoggingItem::setLine |
( |
const int |
val | ) |
|
|
inline |
◆ setLogFile()
| void LoggingItem::setLogFile |
( |
const QString & |
val | ) |
|
|
inline |
◆ setMessage()
| void LoggingItem::setMessage |
( |
const QString & |
val | ) |
|
|
inline |
◆ setPid()
| void LoggingItem::setPid |
( |
const int |
val | ) |
|
|
inline |
◆ setThreadId()
| void LoggingItem::setThreadId |
( |
const qulonglong |
val | ) |
|
|
inline |
◆ setThreadName()
| void LoggingItem::setThreadName |
( |
const QString & |
val | ) |
|
|
inline |
◆ setThreadTid()
| void LoggingItem::setThreadTid |
( |
void |
| ) |
|
Set the thread ID of the thread that produced the LoggingItem.
This code is actually run in the thread in question as part of the call to LOG()
- Note
- In different platforms, the actual value returned here will vary. The intention is to get a thread ID that will map well to what is shown in gdb.
Definition at line 166 of file logging.cpp.
Referenced by LoggingItem().
◆ setTid()
| void LoggingItem::setTid |
( |
const qlonglong |
val | ) |
|
|
inline |
◆ setType()
| void LoggingItem::setType |
( |
const int |
val | ) |
|
|
inline |
◆ threadId()
| qulonglong LoggingItem::threadId |
( |
| ) |
const |
|
inline |
◆ threadName()
| QString LoggingItem::threadName |
( |
| ) |
const |
|
inline |
◆ tid()
| qlonglong LoggingItem::tid |
( |
| ) |
const |
|
inline |
◆ toString()
| std::string LoggingItem::toString |
( |
| ) |
|
◆ toStringShort()
| std::string LoggingItem::toStringShort |
( |
| ) |
|
◆ type()
| int LoggingItem::type |
( |
| ) |
const |
|
inline |
◆ LoggerThread
◆ LogPrintLine
| MBASE_PUBLIC void LogPrintLine |
( |
uint64_t |
mask, |
|
|
LogLevel_t |
level, |
|
|
const char * |
file, |
|
|
int |
line, |
|
|
const char * |
function, |
|
|
QString |
message |
|
) |
| |
|
friend |
Format and send a log message into the queue.
This is called from the LOG() macro. The intention is minimal blocking of the caller.
- Parameters
-
| mask | Verbosity mask of the message (VB_*) |
| level | Log level of this message (LOG_* - matching syslog levels) |
| file | Filename of source code logging the message |
| line | Line number within the source of log message source |
| function | Function name of the log message source |
| message | log message |
Definition at line 537 of file logging.cpp.
◆ m_appName
| QString LoggingItem::m_appName |
|
protected |
◆ m_epoch
| std::chrono::microseconds LoggingItem::m_epoch {0us} |
|
protected |
◆ m_facility
| int LoggingItem::m_facility {0} |
|
protected |
◆ m_file
| QString LoggingItem::m_file |
|
protected |
◆ m_function
| QString LoggingItem::m_function |
|
protected |
◆ m_level
| LogLevel_t LoggingItem::m_level {LOG_INFO} |
|
protected |
◆ m_line
| int LoggingItem::m_line {0} |
|
protected |
◆ m_logFile
| QString LoggingItem::m_logFile |
|
protected |
◆ m_message
| QString LoggingItem::m_message |
|
protected |
◆ m_pid
| int LoggingItem::m_pid {-1} |
|
protected |
◆ m_threadId
| qulonglong LoggingItem::m_threadId {UINT64_MAX} |
|
protected |
◆ m_threadName
| QString LoggingItem::m_threadName |
|
protected |
◆ m_tid
| qlonglong LoggingItem::m_tid {-1} |
|
protected |
◆ m_type
◆ appName
| QString LoggingItem::appName |
|
readwrite |
◆ epoch
| qlonglong LoggingItem::epoch |
|
readwrite |
◆ facility
| int LoggingItem::facility |
|
readwrite |
◆ file
| QString LoggingItem::file |
|
readwrite |
◆ function
| QString LoggingItem::function |
|
readwrite |
◆ level
◆ line
◆ logFile
| QString LoggingItem::logFile |
|
readwrite |
◆ message
| QString LoggingItem::message |
|
readwrite |
◆ pid
◆ threadId
| qulonglong LoggingItem::threadId |
|
readwrite |
◆ threadName
| QString LoggingItem::threadName |
|
readwrite |
◆ tid
| qlonglong LoggingItem::tid |
|
readwrite |
◆ type
The documentation for this class was generated from the following files: