/*
- 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;
static const char *prefixes[] = {
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
+
+