4// View this file's documentation online: https://libgumball.psyops.studio/gumball__logger_8h.html
5
6/*! \file
7 * \brief Gumball logger
8 * \ingroup core
9 *
10 * Simple wrappers around GBL_LOG_* for convenience
11 * All logs are prefixed with "gumball" as their domain.
12 *
13 * \author 2025 AgustÃn Bellagamba
14 * \copyright MIT License
15*/
16
17#include<gimbal/core/gimbal_logger.h>
18
19#defineGUM_LOG_VERBOSE(...)GBL_LOG_VERBOSE("gumball",__VA_ARGS__)//!< Logs with GBL_LOG_VERBOSE
20#defineGUM_LOG_DEBUG(...)GBL_LOG_DEBUG("gumball",__VA_ARGS__)//!< Logs with GBL_LOG_DEBUG
21#defineGUM_LOG_INFO(...)GBL_LOG_INFO("gumball",__VA_ARGS__)//!< Logs with GBL_LOG_INFO
22#defineGUM_LOG_WARN(...)GBL_LOG_WARN("gumball",__VA_ARGS__)//!< Logs with GBL_LOG_WARN
23#defineGUM_LOG_ERROR(...)GBL_LOG_ERROR("gumball",__VA_ARGS__)//!< Logs with GBL_LOG_ERROR
24#defineGUM_LOG_PUSH()GBL_LOG_PUSH()
25#defineGUM_LOG_POP(n)GBL_LOG_POP(n)
26
27#defineGUM_LOG_VERBOSE_PUSH(...)GBL_LOG_VERBOSE_PUSH("gumball",__VA_ARGS__)//!< Pushes a level to the log stack, then logs with GBL_LOG_VERBOSE
28#defineGUM_LOG_DEBUG_PUSH(...)GBL_LOG_DEBUG_PUSH("gumball",__VA_ARGS__)//!< Pushes a level to the log stack, then logs with GBL_LOG_DEBUG
29#defineGUM_LOG_INFO_PUSH(...)GBL_LOG_INFO_PUSH("gumball",__VA_ARGS__)//!< Pushes a level to the log stack, then logs with GBL_LOG_INFO
30#defineGUM_LOG_WARN_PUSH(...)GBL_LOG_WARN_PUSH("gumball",__VA_ARGS__)//!< Pushes a level to the log stack, then logs with GBL_LOG_WARN
31#defineGUM_LOG_ERROR_PUSH(...)GBL_LOG_ERROR_PUSH("gumball",__VA_ARGS__)//!< Pushes a level to the log stack, then logs with GBL_LOG_ERROR
32
33
34#defineGUM_LOG_VERBOSE_SCOPE(...)GBL_LOG_VERBOSE_SCOPE("gumball",__VA_ARGS__)//!< Logs with GBL_LOG_VERBOSE, then pushes a level to the log stack. Pops level when scope ends
35#defineGUM_LOG_DEBUG_SCOPE(...)GBL_LOG_DEBUG_SCOPE("gumball",__VA_ARGS__)//!< Logs with GBL_LOG_DEBUG, then pushes a level to the log stack. Pops level when scope ends
36#defineGUM_LOG_INFO_SCOPE(...)GBL_LOG_INFO_SCOPE("gumball",__VA_ARGS__)//!< Logs with GBL_LOG_INFO, then pushes a level to the log stack. Pops level when scope ends
37#defineGUM_LOG_WARN_SCOPE(...)GBL_LOG_WARN_SCOPE("gumball",__VA_ARGS__)//!< Logs with GBL_LOG_WARN, then pushes a level to the log stack. Pops level when scope ends
38#defineGUM_LOG_ERROR_SCOPE(...)GBL_LOG_ERROR_SCOPE("gumball",__VA_ARGS__)//!< Logs with GBL_LOG_ERROR, then pushes a level to the log stack. Pops level when scope ends