cleaning copyrights
[src/app-framework-binder.git] / src / verbose.c
index 29d2a9e..892aa9a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- Copyright 2015 IoT.bzh
+ Copyright (C) 2016 "IoT.bzh"
 
  author: José Bollo <jose.bollo@iot.bzh>
 
  limitations under the License.
 */
 
+#include "verbose.h"
+
+#if !defined(VERBOSE_WITH_SYSLOG)
+
 #include <stdio.h>
 #include <stdarg.h>
-#include "verbose.h"
 
 int verbosity = 1;
 
@@ -43,3 +46,22 @@ void verbose(int level, const char *file, int line, const char *fmt, ...)
        va_end(ap);
        fprintf(stderr, " [%s:%d]\n", file, line);
 }
+
+#endif
+
+#if defined(VERBOSE_WITH_SYSLOG) && !defined(NDEBUG)
+
+int verbosity = 1;
+
+#endif
+
+#if defined(VERBOSE_WITH_SYSLOG) && defined(NDEBUG)
+
+void verbose_error(const char *file, int line)
+{
+       syslog(LOG_ERR, "error file %s line %d", file, line);
+}
+
+#endif
+
+