vdr-plugin-softhddevice-drm-gles 1.6.7
cSoftHdLogger Class Reference

Logger. More...

#include <logger.h>

Public Member Functions

void LogFatal (const char *format,...)
 Log to syslog LOG_ERR and abort.
 
void LogError (const char *format,...)
 Log to syslog LOG_ERR.
 
void LogWarning (const char *format,...)
 Log to syslog LOG_WARNING.
 
void LogInfo (const char *format,...)
 Log to syslog LOG_INFO.
 
void LogDebug (const char *format,...)
 Log to syslog LOG_DEBUG.
 
void LogDebug2 (const int cat, const char *format,...)
 Log to syslog LOG_DEBUG and add logging category to output.
 
void LogFFmpeg (const char *, va_list)
 Log to syslog LOG_DEBUG and add prefix [FFMpeg] to output.
 
void SetLogLevel (int level)
 
int GetLogLevel (void)
 

Static Public Member Functions

static std::shared_ptr< cSoftHdLoggerGetLogger ()
 Get an instance to the global logger.
 
static void LogFFmpegCallback (void *, int, const char *, va_list)
 Callback for ffmpeg logs.
 

Private Member Functions

 cSoftHdLogger (void)=default
 
 cSoftHdLogger (const cSoftHdLogger &)=delete
 
cSoftHdLoggeroperator= (const cSoftHdLogger &)=delete
 

Private Attributes

std::atomic< intm_logLevel = 0
 loglevel mask (see enum LogFlags)
 

Static Private Attributes

static constexpr int MAX_LOGMESSAGE_SIZE = 512
 max size of the log message
 

Detailed Description

Logger.

Plugin specific logging implementation which does not depend on VDR loglevels

Definition at line 82 of file logger.h.

Constructor & Destructor Documentation

◆ cSoftHdLogger() [1/2]

cSoftHdLogger::cSoftHdLogger ( void  )
privatedefault

Referenced by GetLogger().

◆ cSoftHdLogger() [2/2]

cSoftHdLogger::cSoftHdLogger ( const cSoftHdLogger )
privatedelete

Member Function Documentation

◆ GetLogger()

std::shared_ptr< cSoftHdLogger > cSoftHdLogger::GetLogger ( )
static

Get an instance to the global logger.

Returns
pointer to the logger instance

Definition at line 43 of file logger.cpp.

References cSoftHdLogger().

Referenced by LogFFmpegCallback(), cSoftHdConfig::SetupParse(), and cMenuSetupSoft::Store().

◆ GetLogLevel()

int cSoftHdLogger::GetLogLevel ( void  )
inline

Definition at line 95 of file logger.h.

References m_logLevel.

◆ LogDebug()

void cSoftHdLogger::LogDebug ( const char format,
  ... 
)

Log to syslog LOG_DEBUG.

Definition at line 130 of file logger.cpp.

References m_logLevel, and MAX_LOGMESSAGE_SIZE.

◆ LogDebug2()

void cSoftHdLogger::LogDebug2 ( const int  cat,
const char format,
  ... 
)

Log to syslog LOG_DEBUG and add logging category to output.

Definition at line 149 of file logger.cpp.

References L_AV_SYNC, L_CODEC, L_DEBUG, L_DRM, L_GRAB, L_MEDIA, L_OPENGL, L_OPENGL_TIME, L_OPENGL_TIME_ALL, L_OSD, L_PACKET, L_SOUND, L_STILL, L_TRICK, m_logLevel, and MAX_LOGMESSAGE_SIZE.

◆ LogError()

void cSoftHdLogger::LogError ( const char format,
  ... 
)

Log to syslog LOG_ERR.

Definition at line 73 of file logger.cpp.

References MAX_LOGMESSAGE_SIZE, and SysLogLevel.

◆ LogFatal()

void cSoftHdLogger::LogFatal ( const char format,
  ... 
)

Log to syslog LOG_ERR and abort.

Definition at line 52 of file logger.cpp.

References MAX_LOGMESSAGE_SIZE, and SysLogLevel.

◆ LogFFmpeg()

void cSoftHdLogger::LogFFmpeg ( const char fmt,
va_list  vl 
)

Log to syslog LOG_DEBUG and add prefix [FFMpeg] to output.

Definition at line 209 of file logger.cpp.

References AV_LOGLEVEL, L_FFMPEG, m_logLevel, and MAX_LOGMESSAGE_SIZE.

◆ LogFFmpegCallback()

void cSoftHdLogger::LogFFmpegCallback ( void ptr,
int  level,
const char fmt,
va_list  vl 
)
static

Callback for ffmpeg logs.

Log to LOG_DEBUG and add prefix to output

Definition at line 231 of file logger.cpp.

References GetLogger().

Referenced by cVideoDecoder::cVideoDecoder().

◆ LogInfo()

void cSoftHdLogger::LogInfo ( const char format,
  ... 
)

Log to syslog LOG_INFO.

Definition at line 111 of file logger.cpp.

References MAX_LOGMESSAGE_SIZE, and SysLogLevel.

◆ LogWarning()

void cSoftHdLogger::LogWarning ( const char format,
  ... 
)

Log to syslog LOG_WARNING.

Definition at line 92 of file logger.cpp.

References MAX_LOGMESSAGE_SIZE, and SysLogLevel.

◆ operator=()

cSoftHdLogger & cSoftHdLogger::operator= ( const cSoftHdLogger )
privatedelete

◆ SetLogLevel()

void cSoftHdLogger::SetLogLevel ( int  level)
inline

Definition at line 94 of file logger.h.

References m_logLevel.

Member Data Documentation

◆ m_logLevel

std::atomic<int> cSoftHdLogger::m_logLevel = 0
private

loglevel mask (see enum LogFlags)

Definition at line 104 of file logger.h.

Referenced by GetLogLevel(), LogDebug(), LogDebug2(), LogFFmpeg(), and SetLogLevel().

◆ MAX_LOGMESSAGE_SIZE

constexpr int cSoftHdLogger::MAX_LOGMESSAGE_SIZE = 512
staticconstexprprivate

max size of the log message

Definition at line 102 of file logger.h.

Referenced by LogDebug(), LogDebug2(), LogError(), LogFatal(), LogFFmpeg(), LogInfo(), and LogWarning().


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