Class Description
Log APIs are defined in Log.h. This class will be officially deleted in December, 2025. It is for internal use only.
In a multi-process scenario, 50 logs can be dumped for a single process by default, and a maximum of 1000 logs can be dumped in total. When the number of processes exceeds 1000, some dumped logs are lost.
For details about log configuration, see Log Configuration File.
Supported Models
Atlas inference product
Atlas 800I A2 inference product
The following macro definitions can be used to print logs.
Macro Definition |
Description |
|---|---|
#define LogDebug VLOG_EVERY_N(MxBase::LOG_LEVEL_DEBUG, MxBase::Log::logFlowControlFrequency_) |
LogDebug records the debugging information. |
#define LogInfo LOG_EVERY_N(INFO, MxBase::Log::logFlowControlFrequency_) |
LogInfo records information in key steps (such as initialization), which is irrelevant to data. |
#define LogWarn LOG_EVERY_N(WARNING, MxBase::Log::logFlowControlFrequency_) |
LogWarn records warning information generated during data processing. |
#define LogError LOG_EVERY_N(ERROR, MxBase::Log::logFlowControlFrequency_) |
LogError records error information during data processing. |
#define LogFatal LOG_EVERY_N(FATAL, MxBase::Log::logFlowControlFrequency_) |
LogFatal records fatal information in key steps (such as initialization). |
#define FILELINE __FILE__, __FUNCTION__, __LINE__ |
Describes the current file, function, and code line. |
Examples
1 2 3 4 5 | LogDebug << "Begin to process MpDataSerialize(" << elementName_ << ")."; LogInfo << "Begin to initialize MpDataSerialize(" << elementName_ << ")."; LogWarn << "Input data is invalid, element (" << elementName_ <<") will not run normally."; LogError << GetErrorInfo(ret, elementName_) << "Fail to initialize dvppWrapper_ object."; LogFatal << GetErrorInfo(ret, elementName_) << "Invalid transfer mode."; |