1 // 2 // Copyright © 2017 Arm Ltd. All rights reserved. 3 // SPDX-License-Identifier: MIT 4 // 5 #pragma once 6 7 #include "armnn/TypesUtils.hpp" 8 9 namespace armnn 10 { 11 12 enum class LogSeverity 13 { 14 Trace, 15 Debug, 16 Info, 17 Warning, 18 Error, 19 Fatal 20 }; 21 22 /// Configures the logging behaviour of the ARMNN library. 23 /// printToStandardOutput: Set to true if log messages should be printed to the standard output. 24 /// printToDebugOutput: Set to true if log messages be printed to a platform-specific debug output 25 /// (where supported). 26 /// severity: All log messages that are at this severity level or higher will be printed, others will be ignored. 27 void ConfigureLogging(bool printToStandardOutput, bool printToDebugOutput, LogSeverity severity); 28 29 30 #if defined(__clang__) &&((__clang_major__>=3)||(__clang_major__==3 && __clang_minor__ >= 5)) 31 # define ARMNN_FALLTHROUGH [[clang::fallthrough]] 32 #elif defined(__GNUC__) && (__GNUC__ >= 7) 33 # define ARMNN_FALLTHROUGH __attribute__((fallthrough)) 34 #else 35 # define ARMNN_FALLTHROUGH ((void)0) 36 #endif 37 38 } // namespace armnn 39