summaryrefslogtreecommitdiff
path: root/include/rune/core/logging.h
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2024-10-25 23:02:31 -0500
committerDanny Holman <dholman@gymli.org>2024-10-25 23:02:31 -0500
commit6e8177dae93f592b1d39cd6d6e77c9e6f254360f (patch)
tree2735f467cec1ae73b9382ac057f817fae1f94dac /include/rune/core/logging.h
parent71befd8eaf7244badb0188b751066afacb8d8ee3 (diff)
core: add documentation comments to API functions
Add documentation comments to the functions and structures exposed through the Rune API. Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'include/rune/core/logging.h')
-rw-r--r--include/rune/core/logging.h33
1 files changed, 28 insertions, 5 deletions
diff --git a/include/rune/core/logging.h b/include/rune/core/logging.h
index df4ed7e..5582d0d 100644
--- a/include/rune/core/logging.h
+++ b/include/rune/core/logging.h
@@ -24,18 +24,41 @@
#include <rune/util/types.h>
+/// Indicates the error level of the message
enum log_level {
- LOG_FATAL,
- LOG_ERROR,
- LOG_WARN,
- LOG_INFO,
- LOG_DEBUG
+ LOG_FATAL, ///< A major error has occured and execution cannot continue
+ LOG_ERROR, ///< A major error has occured
+ LOG_WARN, ///< A minor error has occured
+ LOG_INFO, ///< A simple event has occured
+ LOG_DEBUG ///< A confirmation or other debugging message, only printed when enabled
};
+/**
+ * \brief Print message to the engine log
+ * \param[in] level Error level, a value in log_level
+ * \param[in] fmt Format string
+ * \param[in] ... Format specifiers (%d, %s, etc.)
+ */
RAPI void log_output(int level, const char *fmt, ...);
+
+/**
+ * \brief Enable debug logging
+ */
RAPI void enable_log_debug(void);
+
+/**
+ * \brief Disable debug logging (default)
+ */
RAPI void disable_log_debug(void);
+
+/**
+ * \brief Enable color output (default)
+ */
RAPI void enable_log_color(void);
+
+/**
+ * \brief Disable color output
+ */
RAPI void disable_log_color(void);
#endif