X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fverbose.c;h=892aa9a322ad1559f47608b3c966e7d81310a7eb;hb=779f425daa66d2b0cd431fdc6f7f4ed976cbae15;hp=3f971ce35e7ad6b60a046416d34253673336eaf1;hpb=6721f5c4220d4d46c18b8d86c2195ff439a74155;p=src%2Fapp-framework-binder.git diff --git a/src/verbose.c b/src/verbose.c index 3f971ce3..892aa9a3 100644 --- a/src/verbose.c +++ b/src/verbose.c @@ -1,5 +1,5 @@ /* - Copyright 2015 IoT.bzh + Copyright (C) 2016 "IoT.bzh" author: José Bollo @@ -16,11 +16,13 @@ limitations under the License. */ +#include "verbose.h" + +#if !defined(VERBOSE_WITH_SYSLOG) + #include #include -#include "verbose.h" - int verbosity = 1; static const char *prefixes[] = { @@ -44,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 + +