#include "clog/common/dep.hpp"매크로 | |
| #define | BY_E(fmt, ...) ::by::richLog(::by::errLv::ERR, __FILENAME__, __func__, __LINE__, fmt "\n", ##__VA_ARGS__) |
| Log macro: prints debug log on console and file. | |
| #define | BY_W(fmt, ...) ::by::richLog(::by::errLv::WARN, __FILENAME__, __func__, __LINE__, fmt "\n", ##__VA_ARGS__) |
| #define | BY_I(fmt, ...) ::by::richLog(::by::errLv::INFO, __FILENAME__, __func__, __LINE__, fmt "\n", ##__VA_ARGS__) |
| #define | BY_E_SCOPE(fmt, ...) |
| Logs scope entry and exit with execution time and depth visualization. | |
| #define | BY_W_SCOPE(fmt, ...) |
| #define | BY_I_SCOPE(fmt, ...) |
| #define | BY_DE(fmt, ...) void() |
| #define | BY_DW(fmt, ...) void() |
| #define | BY_DI(fmt, ...) void() |
| #define | BY_DE_SCOPE(fmt, ...) void() |
| #define | BY_DW_SCOPE(fmt, ...) void() |
| #define | BY_DI_SCOPE(fmt, ...) void() |
| #define | BY_SIDE_FUNC_3(paramPtr, expr, ret) { return paramPtr ? expr : ret; } |
Log macro definitions for byeol language logging system
| #define BY_E | ( | fmt, | |
| ... ) ::by::richLog(::by::errLv::ERR, __FILENAME__, __func__, __LINE__, fmt "\n", ##__VA_ARGS__) |
Log macro: prints debug log on console and file.
You can check the file recorded logs at your current work directory named to "logs".
If you dbg version macros, _DI, _DE, _DW, then log msg will be left only if you use dbg configuration.
| #define BY_E_SCOPE | ( | fmt, | |
| ... ) |
Logs scope entry and exit with execution time and depth visualization.
Uses BY_END and scopeLog for RAII-based scope logging. Graph depth is automatically incremented on entry and decremented on exit.
as you can see below, it defines 'end' instance to catch when the scope ends. so if you use BY_E_SCOPE inside of block statement by expecting it works when the func ends, it won't work as you expected.
in above example, macro will expand like below,
so the start and end of scope logs always printed.
| #define BY_I_SCOPE | ( | fmt, | |
| ... ) |
| #define BY_W_SCOPE | ( | fmt, | |
| ... ) |