summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2010-05-31 10:43:03 +0200
committerLinus Nordberg <linus@nordberg.se>2010-05-31 10:43:03 +0200
commit7ddd8bca678fdd91faa01966d40b3778d085126e (patch)
tree4fbd6ff6f048a13bf9e4a870bd7f944297e1c6d8
parent323c08118e7284e882fdebf1635d5a7c93549b5d (diff)
Add log level DBG_NOTICE.
-rw-r--r--debug.c8
-rw-r--r--debug.h5
2 files changed, 10 insertions, 3 deletions
diff --git a/debug.c b/debug.c
index a01c2dc..3bbcd0a 100644
--- a/debug.c
+++ b/debug.c
@@ -44,9 +44,12 @@ void debug_set_level(uint8_t level) {
debug_level = DBG_WARN;
return;
case 3:
- debug_level = DBG_INFO;
+ debug_level = DBG_NOTICE;
return;
case 4:
+ debug_level = DBG_INFO;
+ return;
+ case 5:
debug_level = DBG_DBG;
return;
}
@@ -137,6 +140,9 @@ void debug_logit(uint8_t level, const char *format, va_list ap) {
case DBG_INFO:
priority = LOG_INFO;
break;
+ case DBG_NOTICE:
+ priority = LOG_NOTICE;
+ break;
case DBG_WARN:
priority = LOG_WARNING;
break;
diff --git a/debug.h b/debug.h
index eaec2a6..803f406 100644
--- a/debug.h
+++ b/debug.h
@@ -12,8 +12,9 @@
#define DBG_DBG 8
#define DBG_INFO 16
-#define DBG_WARN 32
-#define DBG_ERR 64
+#define DBG_NOTICE 32
+#define DBG_WARN 64
+#define DBG_ERR 128
void debug_init(char *ident);
void debug_set_level(uint8_t level);