MythTV  master
Classes | Macros | Typedefs | Enumerations | Functions
logging.h File Reference
#include <QMutexLocker>
#include <QMutex>
#include <QQueue>
#include <QTime>
#include <QPointer>
#include <QCoreApplication>
#include <cstdint>
#include <cstdlib>
#include "mythconfig.h"
#include "mythbaseexp.h"
#include "verbosedefs.h"
#include "mythsignalingtimer.h"
#include "mthread.h"
#include "referencecounter.h"
#include "compat.h"
Include dependency graph for logging.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  LoggingItem
 The logging items that are generated by LOG() and are sent to the console. More...
 
class  LoggerThread
 The logging thread that consumes the logging queue and dispatches each LoggingItem. More...
 

Macros

#define LOGLINE_MAX   (2048-120)
 
#define SET_LOGGING_ARG(arg)
 

Typedefs

typedef struct tm tmType
 

Enumerations

enum  LoggingType {
  kMessage = 0x01, kRegistering = 0x02, kDeregistering = 0x04, kFlush = 0x08,
  kStandardIO = 0x10, kInitializing = 0x20
}
 

Functions

void loggingRegisterThread (const QString &name)
 Register the current thread with the given name. More...
 
void loggingDeregisterThread (void)
 Deregister the current thread's name. More...
 
void loggingGetTimeStamp (qlonglong *epoch, uint *usec)
 

Macro Definition Documentation

◆ LOGLINE_MAX

#define LOGLINE_MAX   (2048-120)

Definition at line 30 of file logging.h.

◆ SET_LOGGING_ARG

#define SET_LOGGING_ARG (   arg)
Value:
{ \
free(arg); \
arg = strdup(val.toLocal8Bit().constData()); \
}

Definition at line 55 of file logging.h.

Typedef Documentation

◆ tmType

typedef struct tm tmType

Definition at line 53 of file logging.h.

Enumeration Type Documentation

◆ LoggingType

Enumerator
kMessage 
kRegistering 
kDeregistering 
kFlush 
kStandardIO 
kInitializing 

Definition at line 42 of file logging.h.

Function Documentation

◆ loggingRegisterThread()

void loggingRegisterThread ( const QString &  name)

Register the current thread with the given name.

This is triggered by the RunProlog() call in each thread.

Parameters
namethe name of the thread being registered. This is used for indicating the thread each log message is coming from.

Definition at line 768 of file logging.cpp.

Referenced by MPoolThread::run(), and MThread::ThreadSetup().

◆ loggingDeregisterThread()

void loggingDeregisterThread ( void  )

Deregister the current thread's name.

This is triggered by the RunEpilog() call in each thread.

Definition at line 787 of file logging.cpp.

Referenced by MPoolThread::run(), MThread::ThreadCleanup(), and MythCoreContextPrivate::~MythCoreContextPrivate().

◆ loggingGetTimeStamp()

void loggingGetTimeStamp ( qlonglong *  epoch,
uint usec 
)

Definition at line 120 of file logging.cpp.

Referenced by LogForwardThread::forwardMessage(), and LoggingItem::LoggingItem().