|
RDK Documentation (Open Sourced RDK Components)
|
Go to the documentation of this file.
20 #ifndef AAMPLOGMANAGER_H
21 #define AAMPLOGMANAGER_H
39 #define traceprintf logprintf
41 #define traceprintf(FORMAT, ...)
50 #define AAMPLOG( MYLOGOBJ, LEVEL, LEVELSTR, FORMAT, ... ) \
55 if( !MYLOGOBJ->isLogLevelAllowed(LEVEL) ) break; \
56 PLAYERID = MYLOGOBJ->getPlayerId(); \
60 if( !gpGlobalConfig->logging.isLogLevelAllowed(LEVEL) ) break; \
63 logprintf_new( PLAYERID, LEVELSTR, __FUNCTION__, __LINE__, FORMAT, ##__VA_ARGS__); \
69 #define AAMP_LOG_NETWORK_LATENCY mLogObj->LogNetworkLatency
70 #define AAMP_LOG_NETWORK_ERROR mLogObj->LogNetworkError
71 #define AAMP_LOG_DRM_ERROR gpGlobalConfig->logging.LogDRMError
72 #define AAMP_LOG_ABR_INFO mLogObj->LogABRInfo
73 #define AAMP_IS_LOG_WORTHY_ERROR mLogObj->isLogworthyErrorCode
75 #define AAMPLOG_FAILOVER(FORMAT, ...) \
76 if (mLogObj && mLogObj->failover) { \
77 logprintf_new(mLogObj->getPlayerId(), "FAILOVER",__FUNCTION__, __LINE__, FORMAT, ##__VA_ARGS__); \
83 #define AAMPLOG_TRACE(FORMAT, ...) AAMPLOG(mLogObj,eLOGLEVEL_TRACE, "TRACE", FORMAT, ##__VA_ARGS__)
84 #define AAMPLOG_INFO(FORMAT, ...) AAMPLOG(mLogObj,eLOGLEVEL_INFO, "INFO", FORMAT, ##__VA_ARGS__)
85 #define AAMPLOG_WARN(FORMAT, ...) AAMPLOG(mLogObj,eLOGLEVEL_WARN, "WARN", FORMAT, ##__VA_ARGS__)
86 #define AAMPLOG_ERR(FORMAT, ...) AAMPLOG(mLogObj,eLOGLEVEL_ERROR, "ERROR", FORMAT, ##__VA_ARGS__)
92 #define MAX_SUPPORTED_LATENCY_LOGGING_TYPES (eMEDIATYPE_IFRAME+1)
122 AAMPAbrBandwidthUpdate,
123 AAMPAbrManifestDownloadFailed,
124 AAMPAbrFragmentDownloadFailed,
125 AAMPAbrUnifiedVideoEngine
135 int currentProfileIndex;
136 int desiredProfileIndex;
137 long currentBandwidth;
138 long desiredBandwidth;
139 long networkBandwidth;
166 static bool disableLogRedirection;
210 void ParseContentUrl(
const char* url, std::string& contentType, std::string& location, std::string& symptom,
MediaType type);
283 static std::string
getHexDebugStr(
const std::vector<uint8_t>& data);
298 extern void logprintf(
const char *format, ...) __attribute__ ((format (printf, 1, 2)));;
304 extern
void logprintf_new(
int playerId,const
char* levelstr,const
char* file,
int line,const
char *format, ...) __attribute__ ((format (printf, 5, 6)));;
314 void DumpBlob(const
unsigned char *ptr,
size_t len);
AAMP_LogLevel
Log level's of AAMP.
AAMPAbrType
ABR type enum.
void logprintf(const char *format,...) __attribute__((format(printf
Print logs to console / log fil.
void setLogAndCfgDirectory(char driveName)
Set log file and cfg directory index.
void LogNetworkError(const char *url, AAMPNetworkErrorType errorType, int errorCode, MediaType type)
Print the network error level logging for triage purpose.
AampLogManager()
AampLogManager constructor.
void LogABRInfo(AAMPAbrInfo *pstAbrInfo)
Log ABR info for triage purpose.
const char * getAampCliCfgPath(void)
Get aampcli cfg directory.
void LogDRMError(int major, int minor)
Print the DRM error level logging for triage purpose.
void LogNetworkLatency(const char *url, int downloadTime, int downloadThresholdTimeoutMs, MediaType type)
Print the network latency level logging for triage purpose.
AAMPNetworkErrorType
Log level network error enum.
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.
bool isLogworthyErrorCode(int errorCode)
Check curl error before log on console.
const char * getAampCfgPath(void)
Get aamp cfg directory.
bool isLogLevelAllowed(AAMP_LogLevel chkLevel)
To check the given log level is allowed to print mechanism.
int getPlayerId()
Get PlayerId.
void setPlayerId(int playerId)
Set PlayerId.
@ AAMPNetworkErrorTimeout
void ParseContentUrl(const char *url, std::string &contentType, std::string &location, std::string &symptom, MediaType type)
To get the issue symptom based on the error type for triage purpose.
static std::string getHexDebugStr(const std::vector< uint8_t > &data)
Get a hex string representation of a vector of bytes.
void DumpBlob(const unsigned char *ptr, size_t len)
Compactly log blobs of binary data.
void setLogLevel(AAMP_LogLevel newLevel)
Set the log level for print mechanism.