TcrSdk-Windows V1.0
log_utils.h
Go to the documentation of this file.
1#ifndef LOG_UTILS_H_
2#define LOG_UTILS_H_
3
4#include "tcr_logger.h"
5#include <memory>
10{
11public:
23 static void SetLogger(std::shared_ptr<TcrLogger>logger);
24
25 /*
26 * @brief Print trace level log
27 *
28 * NOTE: Print only in 'Debug' run mode
29 */
30 static void t(const char* tag, const char* log); // trace
31 /*
32 * @brief Print debug level log
33 *
34 * NOTE: Print only in 'Debug' run mode
35 */
36 static void d(const char* tag, const char* log); // debug
37 /*
38 * @brief Print info level log
39 */
40 static void i(const char* tag, const char* log); // info
41 /*
42 * @brief Print warn level log
43 */
44 static void w(const char* tag, const char* log); // warn
45 /*
46 * @brief Print error level log
47 */
48 static void e(const char* tag, const char* log); // error
49
50private:
51 LogUtils() = delete;
52 ~LogUtils() = delete;
53 static std::weak_ptr<TcrLogger>logger_;
54};
55
56#endif // !LOG_UTILS_H_
57
58
59
This class can be used to print logs created by TcrSdk.
Definition log_utils.h:10
static void t(const char *tag, const char *log)
static void i(const char *tag, const char *log)
static void SetLogger(std::shared_ptr< TcrLogger >logger)
Set a logger for the TcrSdk.
static void w(const char *tag, const char *log)
static void e(const char *tag, const char *log)
static void d(const char *tag, const char *log)