aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--src/comet.c13
2 files changed, 15 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 796df02..cf55cc2 100644
--- a/Makefile
+++ b/Makefile
@@ -12,11 +12,11 @@ PCDEP = xcb \
"xcb-randr >= 1.5" \
pangocairo
-CFLAGS := $(shell pkg-config --cflags $(PCDEP)) -Wall -Werror
-LDFLAGS := $(shell pkg-config --libs $(PCDEP)) -lm
+CFLAGS := $(shell pkg-config --cflags $(PCDEP)) -Wall -Werror $(CFLAGS)
+LDFLAGS := $(shell pkg-config --libs $(PCDEP)) -lm $(LDFLAGS)
ifdef RELEASE
-CFLAGS += -O2
+CFLAGS += -O2 -DRELEASE=1
else
CFLAGS += -ggdb
endif
diff --git a/src/comet.c b/src/comet.c
index c0343e0..0a16426 100644
--- a/src/comet.c
+++ b/src/comet.c
@@ -8,8 +8,19 @@
#include "event.h"
#include "config.h"
-#define ANY_LOG_IMPLEMENT
+#ifdef RELEASE
+#define ANY_LOG_VALUE_BEFORE(level, module, func, message) \
+ "[%s%s%s] %s%s%s: %s [", any_log_colors[ANY_LOG_ALL + 2], func, any_log_colors[ANY_LOG_ALL], \
+ any_log_colors[level], any_log_level_strings[level], any_log_colors[ANY_LOG_ALL], message
+#define ANY_LOG_FORMAT_BEFORE(level, module, func) \
+ "[%s%s%s] %s%s%s: ", any_log_colors[ANY_LOG_ALL + 2], func, any_log_colors[ANY_LOG_ALL], \
+ any_log_colors[level], any_log_level_strings[level], any_log_colors[ANY_LOG_ALL]
+#define ANY_LOG_FUNC_COLOR ""
+#define ANY_LOG_NO_TRACE
+#endif
+
#define ANY_LOG_VALUE_STRING(key, value) "%s=\"%s\"", key, value ? value : "(null)"
+#define ANY_LOG_IMPLEMENT
#include "any_log.h"
cairo_surface_t *render(layout_t *layout, layout_info_t info)