X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fverbose.c;h=892aa9a322ad1559f47608b3c966e7d81310a7eb;hb=5c1e761a2f84439b6e53ff1682ee665a7db2bca1;hp=29d2a9e647c23a179f0cb190046bfd655feb011c;hpb=7ea1657b459aea2cc6ef9332621a19d7e2676b1d;p=src%2Fapp-framework-binder.git diff --git a/src/verbose.c b/src/verbose.c index 29d2a9e6..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,9 +16,12 @@ limitations under the License. */ +#include "verbose.h" + +#if !defined(VERBOSE_WITH_SYSLOG) + #include #include -#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 + +