From 6e8177dae93f592b1d39cd6d6e77c9e6f254360f Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Fri, 25 Oct 2024 23:02:31 -0500 Subject: 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 --- include/rune/core/logging.h | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) (limited to 'include/rune/core/logging.h') 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 +/// 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 -- cgit v1.2.3