diff --git a/include/vkcv/Logger.hpp b/include/vkcv/Logger.hpp index bb60561e80baadfcac4956223d9313893547068f..45a397a05cd299f7d61b2b0c76a7d1e30c1b5573 100644 --- a/include/vkcv/Logger.hpp +++ b/include/vkcv/Logger.hpp @@ -4,6 +4,9 @@ namespace vkcv { + /** + * Enum class to specify the level of logging. + */ enum class LogLevel { RAW_INFO, INFO, @@ -11,6 +14,11 @@ namespace vkcv { ERROR }; + /** + * Return the fitting output stream to print messages of a given level of logging. + * @param level Level of logging + * @return Output stream (stdout or stderr) + */ constexpr auto getLogOutput(LogLevel level) { switch (level) { case LogLevel::RAW_INFO: @@ -21,6 +29,11 @@ namespace vkcv { } } + /** + * Return the fitting identifier for messages of a given level of logging. + * @param level Level of logging + * @return Identifier of the given level of logging + */ constexpr const char* getLogName(LogLevel level) { switch (level) { case LogLevel::RAW_INFO: @@ -44,6 +57,10 @@ namespace vkcv { #define __PRETTY_FUNCTION__ __FUNCSIG__ #endif +/** + * Macro-function to log formatting messages with a specific level of logging. + * @param level Level of logging + */ #define vkcv_log(level, ...) { \ char output_message [ \ VKCV_DEBUG_MESSAGE_LEN \ @@ -76,6 +93,10 @@ namespace vkcv { } #else +/** + * Macro-function to log formatting messages with a specific level of logging. + * @param level Level of logging + */ #define vkcv_log(level, ...) {} #endif