X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fverbose.c;fp=src%2Fverbose.c;h=82de1779b95e19db2df55e6ff0f3f90817b0582c;hb=b5cf93aed93e7f331eb645c8afe5317fb67ee50e;hp=3f971ce35e7ad6b60a046416d34253673336eaf1;hpb=09b02c50df8ae0d87ce7b3e5e092eb93086f5f1e;p=src%2Fapp-framework-binder.git diff --git a/src/verbose.c b/src/verbose.c index 3f971ce3..82de1779 100644 --- a/src/verbose.c +++ b/src/verbose.c @@ -1,5 +1,5 @@ /* - Copyright 2015 IoT.bzh + Copyright 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 + +