vdr-plugin-softhddevice-drm-gles 1.6.4-d0291bb
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)
 Set the loglevel.
 

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().

◆ LogDebug()

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

Log to syslog LOG_DEBUG.

Definition at line 140 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 159 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 83 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 62 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 219 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 241 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 121 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 102 of file logger.cpp.

References MAX_LOGMESSAGE_SIZE, and SysLogLevel.

◆ operator=()

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

◆ SetLogLevel()

void cSoftHdLogger::SetLogLevel ( int  level)

Set the loglevel.

Parameters
levelnew loglevel

Definition at line 54 of file logger.cpp.

References m_logLevel.

Member Data Documentation

◆ m_logLevel

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

loglevel mask (see enum LogFlags)

Definition at line 102 of file logger.h.

Referenced by 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 100 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: