aboutsummaryrefslogtreecommitdiff
path: root/profiling/common/include/Logging.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'profiling/common/include/Logging.hpp')
-rw-r--r--profiling/common/include/Logging.hpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/profiling/common/include/Logging.hpp b/profiling/common/include/Logging.hpp
index a31c2aaa7b..7a265d552d 100644
--- a/profiling/common/include/Logging.hpp
+++ b/profiling/common/include/Logging.hpp
@@ -16,6 +16,14 @@ namespace arm
namespace pipe
{
+#if defined(__clang__) &&((__clang_major__>=3)||(__clang_major__==3 && __clang_minor__ >= 5))
+# define ARM_PIPE_FALLTHROUGH [[clang::fallthrough]]
+#elif defined(__GNUC__) && (__GNUC__ >= 7)
+# define ARM_PIPE_FALLTHROUGH __attribute__((fallthrough))
+#else
+# define ARM_PIPE_FALLTHROUGH ((void)0)
+#endif
+
enum class LogSeverity
{
Trace,
@@ -47,6 +55,13 @@ inline std::string LevelToString(LogSeverity level)
}
}
+/// Configures the logging behaviour of the ARMNN library.
+/// printToStandardOutput: Set to true if log messages should be printed to the standard output.
+/// printToDebugOutput: Set to true if log messages be printed to a platform-specific debug output
+/// (where supported).
+/// severity: All log messages that are at this severity level or higher will be printed, others will be ignored.
+void ConfigureLogging(bool printToStandardOutput, bool printToDebugOutput, LogSeverity severity);
+
class LogSink
{
public:
@@ -124,7 +139,7 @@ public:
{
}
- static SimpleLogger& Get()
+ static SimpleLogger<Level>& Get()
{
static SimpleLogger<Level> logger;
return logger;