Skip to content
Snippets Groups Projects
Verified Commit c7580f46 authored by Tobias Frisch's avatar Tobias Frisch
Browse files

[#96] Added doxygen comments for logging functions

parent b48ebd4f
No related branches found
No related tags found
1 merge request!97Resolve "Dokumentation vervollständigen"
Pipeline #27564 passed
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment