NVIDIA DeepStream SDK API Reference

6.0.1 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvdsinfer_logger.h
Go to the documentation of this file.
1 
12 #ifndef __NVDSINFER_LOGGER_H__
13 #define __NVDSINFER_LOGGER_H__
14 
15 #include <memory>
16 #include <mutex>
17 
18 #include <NvInfer.h>
19 #include <nvdsinfer.h>
20 
21 #if defined(NDEBUG)
22 #define INFER_LOG_FORMAT_(fmt) fmt
23 #else
24 #define INFER_LOG_FORMAT_(fmt) "%s:%d " fmt, __FILE__, __LINE__
25 #endif
26 
27 #define dsInferError(fmt, ...) \
28  do { \
29  dsInferLogPrint__( \
30  NVDSINFER_LOG_ERROR, INFER_LOG_FORMAT_(fmt), ##__VA_ARGS__); \
31  } while (0)
32 
33 #define dsInferWarning(fmt, ...) \
34  do { \
35  dsInferLogPrint__( \
36  NVDSINFER_LOG_WARNING, INFER_LOG_FORMAT_(fmt), ##__VA_ARGS__); \
37  } while (0)
38 
39 #define dsInferInfo(fmt, ...) \
40  do { \
41  dsInferLogPrint__( \
42  NVDSINFER_LOG_INFO, INFER_LOG_FORMAT_(fmt), ##__VA_ARGS__); \
43  } while (0)
44 
45 #define dsInferDebug(fmt, ...) \
46  do { \
47  dsInferLogPrint__( \
48  NVDSINFER_LOG_DEBUG, INFER_LOG_FORMAT_(fmt), ##__VA_ARGS__); \
49  } while (0)
50 
51 namespace nvdsinfer {
52 void dsInferLogPrint__(NvDsInferLogLevel level, const char* fmt, ...);
53 }
54 
55 extern std::unique_ptr<nvinfer1::ILogger> gTrtLogger;
56 #endif
void dsInferLogPrint__(NvDsInferLogLevel level, const char *fmt,...)
NvDsInferLogLevel
Enum for the log levels of NvDsInferContext.
Definition: nvdsinfer.h:246
std::unique_ptr< nvinfer1::ILogger > gTrtLogger
NVIDIA DeepStream inference specifications