Compare commits

...

2 Commits

Author SHA1 Message Date
cf80ff7b6b Reverse order of log levels 2019-06-17 22:08:24 +02:00
0309934d82 Add comments for later cleanups 2019-06-17 22:08:11 +02:00
3 changed files with 10 additions and 8 deletions

View File

@ -26,6 +26,7 @@ struct fpga_cell *fpga_fdef_loader_load(char *filename)
if (!cell) { if (!cell) {
report(LL_CRITICAL, report(LL_CRITICAL,
"Out of memory when creating cell."); "Out of memory when creating cell.");
/* TODO: clean up existing cells */
return NULL; return NULL;
} }
break; break;
@ -45,6 +46,7 @@ struct fpga_cell *fpga_fdef_loader_load(char *filename)
if (!cell) { if (!cell) {
report(LL_CRITICAL, report(LL_CRITICAL,
"Out of memory when creating cell."); "Out of memory when creating cell.");
/* TODO: clean up existing cells */
return NULL; return NULL;
} }
break; break;

View File

@ -6,11 +6,11 @@
static int current_log_level = 100; static int current_log_level = 100;
static const char *ll_string[] = { static const char *ll_string[] = {
"\x1B[34m[D] ",
"\x1B[32m[I] ",
"\x1B[33m[W] ",
"\x1B[31m[E] ",
"\x1B[31m\x1B[1m[X] ", "\x1B[31m\x1B[1m[X] ",
"\x1B[31m[E] ",
"\x1B[33m[W] ",
"\x1B[32m[I] ",
"\x1B[34m[D] ",
"[?] " "[?] "
}; };

View File

@ -3,11 +3,11 @@
#include <errno.h> #include <errno.h>
enum log_level {LL_DEBUG = 0, enum log_level {LL_CRITICAL = 0,
LL_INFO,
LL_WARNING,
LL_ERROR, LL_ERROR,
LL_CRITICAL, LL_WARNING,
LL_INFO,
LL_DEBUG,
LL_COUNT}; LL_COUNT};
enum log_level report(enum log_level log_level, const char *format, ...); enum log_level report(enum log_level log_level, const char *format, ...);