summaryrefslogtreecommitdiff
path: root/android/main.c
diff options
context:
space:
mode:
authorLukasz Rymanowski <lukasz.rymanowski@tieto.com>2014-03-06 10:38:00 +0100
committerSzymon Janc <szymon.janc@tieto.com>2014-03-10 10:18:35 +0100
commit67b4f4778b34cb06315fa0e30eabf5264650f007 (patch)
tree14899267cd51ec1f5f86f3455735bd388763e0db /android/main.c
parent7373c4f011898c0d0c3a144d524d9be27652f31a (diff)
downloadbluez-67b4f4778b34cb06315fa0e30eabf5264650f007.tar.gz
android: Add possible to enable BlueZ debug logs
With this patch it is possible to enable BlueZ logs. In order to enable it is required to set property: persist.sys.bluetooth.debug to 1 or literaly "true". More info in README
Diffstat (limited to 'android/main.c')
-rw-r--r--android/main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/android/main.c b/android/main.c
index 42bc98270..edec7dcff 100644
--- a/android/main.c
+++ b/android/main.c
@@ -344,12 +344,15 @@ static guint setup_signalfd(void)
static gboolean option_version = FALSE;
static gint option_index = -1;
+static gboolean option_dbg = FALSE;
static GOptionEntry options[] = {
{ "version", 'v', 0, G_OPTION_ARG_NONE, &option_version,
"Show version information and exit", NULL },
{ "index", 'i', 0, G_OPTION_ARG_INT, &option_index,
"Use specified controller", "INDEX"},
+ { "debug", 'd', 0, G_OPTION_ARG_NONE, &option_dbg,
+ "Enable debug logs", NULL},
{ NULL }
};
@@ -473,7 +476,10 @@ int main(int argc, char *argv[])
if (!signal)
return EXIT_FAILURE;
- __btd_log_init("*", 0);
+ if (option_dbg)
+ __btd_log_init("*", 0);
+ else
+ __btd_log_init(NULL, 0);
if (!set_capabilities()) {
__btd_log_cleanup();