From a59d0c7b448597865c679c9d19ee13de742cea02 Mon Sep 17 00:00:00 2001
From: Sander Vrijders <sander.vrijders@intec.ugent.be>
Date: Fri, 12 Feb 2016 13:27:40 +0100
Subject: include: Add logging infrastructure

Adds the logging infrastructure to the prototype. 2 helper scripts are
also provided to compile the prototype in either release or debug
mode. In debug mode debugging logs are printed.
---
 src/da/main.c   | 6 ++++--
 src/ipcp/main.c | 6 ++++--
 src/irm/main.c  | 6 ++++--
 3 files changed, 12 insertions(+), 6 deletions(-)

(limited to 'src')

diff --git a/src/da/main.c b/src/da/main.c
index 2eeb7b36..e2971dca 100644
--- a/src/da/main.c
+++ b/src/da/main.c
@@ -1,8 +1,10 @@
-#include <stdio.h>
+#define OUROBOROS_PREFIX "da"
+
+#include <ouroboros/logs.h>
 
 int main()
 {
-        printf("Test of the DA\n");
+        LOG_DBG("Test of the DA");
 
         return 0;
 }
diff --git a/src/ipcp/main.c b/src/ipcp/main.c
index 19397260..b67b0af9 100644
--- a/src/ipcp/main.c
+++ b/src/ipcp/main.c
@@ -1,8 +1,10 @@
-#include <stdio.h>
+#define OUROBOROS_PREFIX "ipcp"
+
+#include <ouroboros/logs.h>
 
 int main()
 {
-        printf("Test of the IPCP\n");
+        LOG_DBG("Test of the IPCP");
 
         return 0;
 }
diff --git a/src/irm/main.c b/src/irm/main.c
index 6388427f..8ab071e0 100644
--- a/src/irm/main.c
+++ b/src/irm/main.c
@@ -1,8 +1,10 @@
-#include <stdio.h>
+#define OUROBOROS_PREFIX "irm"
+
+#include <ouroboros/logs.h>
 
 int main()
 {
-        printf("Test of the IRM\n");
+        LOG_DBG("Test of the IRM");
 
         return 0;
 }
-- 
cgit v1.2.3