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 53 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 |
◆ 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().
◆ 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().
◆ create()
LoggingItem * LoggingItem::create |
( |
const char * |
_file, |
|
|
const char * |
_function, |
|
|
int |
_line, |
|
|
LogLevel_t |
_level, |
|
|
LoggingType |
_type |
|
) |
| |
|
static |
◆ 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 |
◆ getLevelChar()
char LoggingItem::getLevelChar |
( |
void |
| ) |
|
◆ pid()
int LoggingItem::pid |
( |
| ) |
const |
|
inline |
◆ tid()
qlonglong LoggingItem::tid |
( |
| ) |
const |
|
inline |
◆ threadId()
qulonglong LoggingItem::threadId |
( |
| ) |
const |
|
inline |
◆ line()
int LoggingItem::line |
( |
| ) |
const |
|
inline |
◆ type()
int LoggingItem::type |
( |
| ) |
const |
|
inline |
◆ level()
int LoggingItem::level |
( |
| ) |
const |
|
inline |
◆ facility()
int LoggingItem::facility |
( |
| ) |
const |
|
inline |
◆ epoch()
std::chrono::microseconds LoggingItem::epoch |
( |
| ) |
const |
|
inline |
◆ epochInt()
qlonglong LoggingItem::epochInt |
( |
| ) |
const |
|
inline |
◆ file()
QString LoggingItem::file |
( |
| ) |
const |
|
inline |
◆ function()
QString LoggingItem::function |
( |
| ) |
const |
|
inline |
◆ threadName()
QString LoggingItem::threadName |
( |
| ) |
const |
|
inline |
◆ appName()
QString LoggingItem::appName |
( |
| ) |
const |
|
inline |
◆ logFile()
QString LoggingItem::logFile |
( |
| ) |
const |
|
inline |
◆ message()
QString LoggingItem::message |
( |
| ) |
const |
|
inline |
◆ setPid()
void LoggingItem::setPid |
( |
const int |
val | ) |
|
|
inline |
◆ setTid()
void LoggingItem::setTid |
( |
const qlonglong |
val | ) |
|
|
inline |
◆ setThreadId()
void LoggingItem::setThreadId |
( |
const qulonglong |
val | ) |
|
|
inline |
◆ setLine()
void LoggingItem::setLine |
( |
const int |
val | ) |
|
|
inline |
◆ setType()
void LoggingItem::setType |
( |
const int |
val | ) |
|
|
inline |
◆ setLevel()
void LoggingItem::setLevel |
( |
const int |
val | ) |
|
|
inline |
◆ setFacility()
void LoggingItem::setFacility |
( |
const int |
val | ) |
|
|
inline |
◆ setEpoch()
void LoggingItem::setEpoch |
( |
std::chrono::microseconds |
val | ) |
|
|
inline |
◆ setEpochInt()
void LoggingItem::setEpochInt |
( |
const qlonglong |
val | ) |
|
|
inline |
◆ setFile()
void LoggingItem::setFile |
( |
const QString & |
val | ) |
|
|
inline |
◆ setFunction()
void LoggingItem::setFunction |
( |
const QString & |
val | ) |
|
|
inline |
◆ setThreadName()
void LoggingItem::setThreadName |
( |
const QString & |
val | ) |
|
|
inline |
◆ setAppName()
void LoggingItem::setAppName |
( |
const QString & |
val | ) |
|
|
inline |
◆ setLogFile()
void LoggingItem::setLogFile |
( |
const QString & |
val | ) |
|
|
inline |
◆ setMessage()
void LoggingItem::setMessage |
( |
const QString & |
val | ) |
|
|
inline |
◆ Q_DISABLE_COPY()
◆ 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 528 of file logging.cpp.
◆ m_pid
int LoggingItem::m_pid {-1} |
|
protected |
◆ m_tid
qlonglong LoggingItem::m_tid {-1} |
|
protected |
◆ m_threadId
qulonglong LoggingItem::m_threadId {UINT64_MAX} |
|
protected |
◆ m_line
int LoggingItem::m_line {0} |
|
protected |
◆ m_type
◆ m_level
LogLevel_t LoggingItem::m_level {LOG_INFO} |
|
protected |
◆ m_facility
int LoggingItem::m_facility {0} |
|
protected |
◆ m_epoch
std::chrono::microseconds LoggingItem::m_epoch {0us} |
|
protected |
◆ m_file
QString LoggingItem::m_file |
|
protected |
◆ m_function
QString LoggingItem::m_function |
|
protected |
◆ m_threadName
QString LoggingItem::m_threadName |
|
protected |
◆ m_appName
QString LoggingItem::m_appName |
|
protected |
◆ m_logFile
QString LoggingItem::m_logFile |
|
protected |
◆ m_message
QString LoggingItem::m_message |
|
protected |
◆ pid
◆ tid
qlonglong LoggingItem::tid |
|
readwrite |
◆ threadId
qulonglong LoggingItem::threadId |
|
readwrite |
◆ line
◆ type
◆ level
◆ facility
int LoggingItem::facility |
|
readwrite |
◆ epoch
qlonglong LoggingItem::epoch |
|
readwrite |
◆ file
QString LoggingItem::file |
|
readwrite |
◆ function
QString LoggingItem::function |
|
readwrite |
◆ threadName
QString LoggingItem::threadName |
|
readwrite |
◆ appName
QString LoggingItem::appName |
|
readwrite |
◆ logFile
QString LoggingItem::logFile |
|
readwrite |
◆ message
QString LoggingItem::message |
|
readwrite |
The documentation for this class was generated from the following files: