aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/graph/Types.h
diff options
context:
space:
mode:
Diffstat (limited to 'arm_compute/graph/Types.h')
-rw-r--r--arm_compute/graph/Types.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/arm_compute/graph/Types.h b/arm_compute/graph/Types.h
index b3aa034477..5b6c9bde0d 100644
--- a/arm_compute/graph/Types.h
+++ b/arm_compute/graph/Types.h
@@ -29,10 +29,25 @@
#include "arm_compute/core/TensorInfo.h"
#include "arm_compute/core/utils/logging/Macros.h"
-#define ARM_COMPUTE_LOG_GRAPH(log_level, x) \
+/** Create a default core logger
+ *
+ * @note It will eventually create all default loggers in don't exist
+ */
+#define ARM_COMPUTE_CREATE_DEFAULT_GRAPH_LOGGER() \
+ do \
+ { \
+ if(arm_compute::logging::LoggerRegistry::get().logger("GRAPH") == nullptr) \
+ { \
+ arm_compute::logging::LoggerRegistry::get().create_reserved_loggers(); \
+ } \
+ } while(false)
+
+#define ARM_COMPUTE_LOG_GRAPH(log_level, x) \
+ ARM_COMPUTE_CREATE_DEFAULT_GRAPH_LOGGER(); \
ARM_COMPUTE_LOG_STREAM("GRAPH", log_level, x)
-#define ARM_COMPUTE_LOG_GRAPH_INFO(x) \
+#define ARM_COMPUTE_LOG_GRAPH_INFO(x) \
+ ARM_COMPUTE_CREATE_DEFAULT_GRAPH_LOGGER(); \
ARM_COMPUTE_LOG_STREAM("GRAPH", arm_compute::logging::LogLevel::INFO, x)
namespace arm_compute