if (ll < conf.loglevel_arg || !curses_active)
return;
switch (ll) {
- case DEBUG:
- case INFO:
- case NOTICE:
+ case LL_DEBUG:
+ case LL_INFO:
+ case LL_NOTICE:
color = COLOR_MSG;
break;
default:
static void print_welcome(void)
{
int ll = conf.loglevel_arg;
- if (ll > NOTICE)
+ if (ll > LL_NOTICE)
return;
outputf(COLOR_WELCOME, "Welcome to para_gui " PACKAGE_VERSION
" \"" CODENAME "\". Theme: %s", theme.name);
static void com_ll_decr(void)
{
- if (conf.loglevel_arg <= DEBUG) {
+ if (conf.loglevel_arg <= LL_DEBUG) {
print_in_bar(COLOR_ERRMSG,
"loglevel already at maximal verbosity\n");
return;
static void com_ll_incr(void)
{
- if (conf.loglevel_arg >= EMERG) {
+ if (conf.loglevel_arg >= LL_EMERG) {
print_in_bar(COLOR_ERRMSG,
"loglevel already at miminal verbosity\n");
return;
typeof(x) _x = (x); \
_x > 0? _x : -_x; })
-/** debug loglevel, gets really noisy */
-#define DEBUG 1
-/** still noisy, but won't fill your disk */
-#define INFO 2
-/** normal, but significant event */
-#define NOTICE 3
-/** unexpected event that can be handled */
-#define WARNING 4
-/** unhandled error condition */
-#define ERROR 5
-/** system might be unreliable */
-#define CRIT 6
-/** last message before exit */
-#define EMERG 7
+/** Debug loglevel, gets really noisy. */
+#define LL_DEBUG 1
+/** Still noisy, but won't fill your disk. */
+#define LL_INFO 2
+/** Normal, but significant event. */
+#define LL_NOTICE 3
+/** Unexpected event that can be handled. */
+#define LL_WARNING 4
+/** Unhandled error condition. */
+#define LL_ERROR 5
+/** System might be unreliable. */
+#define LL_CRIT 6
+/** Last message before exit. */
+#define LL_EMERG 7
/** Log messages with lower priority than that will not be compiled in. */
#define COMPILE_TIME_LOGLEVEL 0
/** \cond */
-#if DEBUG > COMPILE_TIME_LOGLEVEL
-#define PARA_DEBUG_LOG(f,...) para_log(DEBUG, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
+#if LL_DEBUG > COMPILE_TIME_LOGLEVEL
+#define PARA_DEBUG_LOG(f,...) para_log(LL_DEBUG, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
#else
#define PARA_DEBUG_LOG(...) do {;} while (0)
#endif
-#if INFO > COMPILE_TIME_LOGLEVEL
-#define PARA_INFO_LOG(f,...) para_log(INFO, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
+#if LL_INFO > COMPILE_TIME_LOGLEVEL
+#define PARA_INFO_LOG(f,...) para_log(LL_INFO, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
#else
#define PARA_INFO_LOG(...) do {;} while (0)
#endif
-#if NOTICE > COMPILE_TIME_LOGLEVEL
-#define PARA_NOTICE_LOG(f,...) para_log(NOTICE, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
+#if LL_NOTICE > COMPILE_TIME_LOGLEVEL
+#define PARA_NOTICE_LOG(f,...) para_log(LL_NOTICE, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
#else
#define PARA_NOTICE_LOG(...) do {;} while (0)
#endif
-#if WARNING > COMPILE_TIME_LOGLEVEL
-#define PARA_WARNING_LOG(f,...) para_log(WARNING, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
+#if LL_WARNING > COMPILE_TIME_LOGLEVEL
+#define PARA_WARNING_LOG(f,...) para_log(LL_WARNING, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
#else
#define PARA_WARNING_LOG(...) do {;} while (0)
#endif
-#if ERROR > COMPILE_TIME_LOGLEVEL
-#define PARA_ERROR_LOG(f,...) para_log(ERROR, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
+#if LL_ERROR > COMPILE_TIME_LOGLEVEL
+#define PARA_ERROR_LOG(f,...) para_log(LL_ERROR, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
#else
#define PARA_ERROR_LOG(...) do {;} while (0)
#endif
-#if CRIT > COMPILE_TIME_LOGLEVEL
-#define PARA_CRIT_LOG(f,...) para_log(CRIT, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
+#if LL_CRIT > COMPILE_TIME_LOGLEVEL
+#define PARA_CRIT_LOG(f,...) para_log(LL_CRIT, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
#else
#define PARA_CRIT_LOG(...) do {;} while (0)
#endif
-#if EMERG > COMPILE_TIME_LOGLEVEL
-#define PARA_EMERG_LOG(f,...) para_log(EMERG, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
+#if LL_EMERG > COMPILE_TIME_LOGLEVEL
+#define PARA_EMERG_LOG(f,...) para_log(LL_EMERG, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
#else
#define PARA_EMERG_LOG(...)
#endif