redirect log_* into hci_dump.pklg

This commit is contained in:
matthias.ringwald 2012-02-20 20:13:28 +00:00
parent a1d7dd1f6f
commit 808722c4b2
2 changed files with 14 additions and 1 deletions

View File

@ -42,7 +42,7 @@ libBTstack.a: $(libBTstack_SOURCES:.c=.o) $(libBTstack_SOURCES:.m=.o)
ranlib $@
BTdaemon: $(BTdaemon_SOURCES)
$(CC) $(CPPFLAGS) -o $@ $(BTdaemon_SOURCES) $(LDFLAGS)
$(CC) $(CPPFLAGS) -DHAVE_HCI_DUMP -o $@ $(BTdaemon_SOURCES) $(LDFLAGS)
@USE_LDID@ export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate ; ldid -S $@
clean:

View File

@ -36,23 +36,36 @@
*/
#include "config.h"
#include "hci_dump.h"
#include <stdio.h>
#ifdef ENABLE_LOG_DEBUG
#ifdef HAVE_HCI_DUMP
#define log_debug(format, ...) hci_dump_log(format, ## __VA_ARGS__)
#else
#define log_debug(format, ...) printf(format, ## __VA_ARGS__)
#endif
#else
#define log_debug(...)
#endif
#ifdef ENABLE_LOG_INFO
#ifdef HAVE_HCI_DUMP
#define log_info(format, ...) hci_dump_log(format, ## __VA_ARGS__)
#else
#define log_info(format, ...) printf(format, ## __VA_ARGS__)
#endif
#else
#define log_info(...)
#endif
#ifdef ENABLE_LOG_ERROR
#ifdef HAVE_HCI_DUMP
#define log_error(format, ...) hci_dump_log(format, ## __VA_ARGS__)
#else
#define log_error(format, ...) printf(format, ## __VA_ARGS__)
#endif
#else
#define log_error(...)
#endif