RDK Documentation (Open Sourced RDK Components)
AampLogManager.h File Reference

Log managed for Aamp. More...

#include <vector>
#include <memory.h>
#include "AampMediaType.h"
Include dependency graph for AampLogManager.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  AAMPAbrInfo
 ABR info structure. More...
 
class  AampLogManager
 AampLogManager Class. More...
 

Macros

#define traceprintf(FORMAT, ...)
 Direct call for trace printf, can be enabled b defining TRACE here.
 
#define AAMPLOG(MYLOGOBJ, LEVEL, LEVELSTR, FORMAT, ...)
 Macro for validating the log level to be enabled. More...
 
#define AAMP_LOG_NETWORK_LATENCY   mLogObj->LogNetworkLatency
 Macro for Triage Level Logging Support.
 
#define AAMP_LOG_NETWORK_ERROR   mLogObj->LogNetworkError
 
#define AAMP_LOG_DRM_ERROR   gpGlobalConfig->logging.LogDRMError
 
#define AAMP_LOG_ABR_INFO   mLogObj->LogABRInfo
 
#define AAMP_IS_LOG_WORTHY_ERROR   mLogObj->isLogworthyErrorCode
 
#define AAMPLOG_FAILOVER(FORMAT, ...)
 
#define AAMPLOG_TRACE(FORMAT, ...)   AAMPLOG(mLogObj,eLOGLEVEL_TRACE, "TRACE", FORMAT, ##__VA_ARGS__)
 AAMP logging defines, this can be enabled through setLogLevel() as per the need.
 
#define AAMPLOG_INFO(FORMAT, ...)   AAMPLOG(mLogObj,eLOGLEVEL_INFO, "INFO", FORMAT, ##__VA_ARGS__)
 
#define AAMPLOG_WARN(FORMAT, ...)   AAMPLOG(mLogObj,eLOGLEVEL_WARN, "WARN", FORMAT, ##__VA_ARGS__)
 
#define AAMPLOG_ERR(FORMAT, ...)   AAMPLOG(mLogObj,eLOGLEVEL_ERROR, "ERROR", FORMAT, ##__VA_ARGS__)
 
#define MAX_SUPPORTED_LATENCY_LOGGING_TYPES   (eMEDIATYPE_IFRAME+1)
 maximum supported mediatype for latency logging
 

Enumerations

enum  AAMP_LogLevel
 Log level's of AAMP. More...
 
enum  AAMPNetworkErrorType
 Log level network error enum. More...
 
enum  AAMPAbrType
 ABR type enum.
 

Functions

void logprintf (const char *format,...) __attribute__((format(printf
 Print logs to console / log fil. More...
 
void logprintf_new (int playerId, const char *levelstr, const char *file, int line, const char *format,...) __attribute__((format(printf
 Print logs to console / log file.
 
void DumpBlob (const unsigned char *ptr, size_t len)
 Compactly log blobs of binary data. More...
 

Variables

AampLogManagermLogObj
 

yes

Log managed for Aamp.

Definition in file AampLogManager.h.


Data Structure Documentation

◆ AAMPAbrInfo

struct AAMPAbrInfo

ABR info structure.

Definition at line 132 of file AampLogManager.h.

Collaboration diagram for AAMPAbrInfo:
Collaboration graph
Data Fields
AAMPAbrType abrCalledFor
int currentProfileIndex
int desiredProfileIndex
long currentBandwidth
long desiredBandwidth
long networkBandwidth
AAMPNetworkErrorType errorType
int errorCode

Macro Definition Documentation

◆ AAMPLOG

#define AAMPLOG (   MYLOGOBJ,
  LEVEL,
  LEVELSTR,
  FORMAT,
  ... 
)
Value:
do { \
int PLAYERID; \
if( MYLOGOBJ ) \
{ \
if( !MYLOGOBJ->isLogLevelAllowed(LEVEL) ) break; \
PLAYERID = MYLOGOBJ->getPlayerId(); \
} \
else \
{ \
if( !gpGlobalConfig->logging.isLogLevelAllowed(LEVEL) ) break; \
PLAYERID = -1; \
} \
logprintf_new( PLAYERID, LEVELSTR, __FUNCTION__, __LINE__, FORMAT, ##__VA_ARGS__); \
} while(0)

Macro for validating the log level to be enabled.

if mConfig or gpGlobalConfig is not initialized, skip logging if mconfig or gpGlobalConfig is initialized, check the LogLevel

Definition at line 50 of file AampLogManager.h.

◆ AAMPLOG_FAILOVER

#define AAMPLOG_FAILOVER (   FORMAT,
  ... 
)
Value:
if (mLogObj && mLogObj->failover) { \
logprintf_new(mLogObj->getPlayerId(), "FAILOVER",__FUNCTION__, __LINE__, FORMAT, ##__VA_ARGS__); \
}

Definition at line 75 of file AampLogManager.h.

Enumeration Type Documentation

◆ AAMP_LogLevel

Log level's of AAMP.

Enumerator
eLOGLEVEL_TRACE 

Trace level

eLOGLEVEL_INFO 

Info level

eLOGLEVEL_WARN 

Warn level

eLOGLEVEL_ERROR 

Error level

eLOGLEVEL_FATAL 

Fatal log level

Definition at line 97 of file AampLogManager.h.

◆ AAMPNetworkErrorType

Log level network error enum.

Enumerator
AAMPNetworkErrorNone 

No network Error

AAMPNetworkErrorHttp 

HTTP error

AAMPNetworkErrorTimeout 

Timeout Error

AAMPNetworkErrorCurl 

curl Error

Definition at line 109 of file AampLogManager.h.

Function Documentation

◆ logprintf()

void logprintf ( const char *  format,
  ... 
)

Print logs to console / log fil.

Print logs to console / log file.

Definition at line 432 of file aamplogging.cpp.

◆ DumpBlob()

void DumpBlob ( const unsigned char *  ptr,
size_t  len 
)

Compactly log blobs of binary data.

Definition at line 533 of file aamplogging.cpp.

AampConfig::logging
AampLogManager logging
Definition: AampConfig.h:462
gpGlobalConfig
AampConfig * gpGlobalConfig
Global configuration.
Definition: main_aamp.cpp:48
AampLogManager::failover
bool failover
Definition: AampLogManager.h:160
AampLogManager::isLogLevelAllowed
bool isLogLevelAllowed(AAMP_LogLevel chkLevel)
To check the given log level is allowed to print mechanism.
Definition: aamplogging.cpp:50
AampLogManager::getPlayerId
int getPlayerId()
Get PlayerId.
Definition: AampLogManager.h:249