diff options
author | David Robillard <d@drobilla.net> | 2015-10-10 18:11:53 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-10-10 18:11:53 +0000 |
commit | 22ea5330650ab1f3cd59367f3ed63e1009a4d736 (patch) | |
tree | 304ab810f8778f164c3703945576fc5268bc53e2 /src | |
parent | fecfdd11d369541bafdd89d23871cacc0f80b1b4 (diff) | |
download | jalv-22ea5330650ab1f3cd59367f3ed63e1009a4d736.tar.gz jalv-22ea5330650ab1f3cd59367f3ed63e1009a4d736.tar.bz2 jalv-22ea5330650ab1f3cd59367f3ed63e1009a4d736.zip |
Add option to enable plugin trace log messages
git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@5764 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/jalv_console.c | 5 | ||||
-rw-r--r-- | src/jalv_gtk.c | 2 | ||||
-rw-r--r-- | src/jalv_internal.h | 1 | ||||
-rw-r--r-- | src/log.c | 2 |
4 files changed, 8 insertions, 2 deletions
diff --git a/src/jalv_console.c b/src/jalv_console.c index b17779b..aa47483 100644 --- a/src/jalv_console.c +++ b/src/jalv_console.c @@ -37,7 +37,8 @@ print_usage(const char* name, bool error) fprintf(os, " -c SYM=VAL Set control value (e.g. \"vol=1.4\")\n"); fprintf(os, " -u UUID UUID for Jack session restoration\n"); fprintf(os, " -l DIR Load state from save directory\n"); - fprintf(os, " -d DIR Dump plugin <=> UI communication\n"); + fprintf(os, " -d Dump plugin <=> UI communication\n"); + fprintf(os, " -t Print trace messages from plugin\n"); fprintf(os, " -b SIZE Buffer size for plugin <=> UI communication\n"); fprintf(os, " -n NAME JACK client name\n"); fprintf(os, " -x Exact JACK client name (exit if taken)\n"); @@ -103,6 +104,8 @@ jalv_init(int* argc, char*** argv, JalvOptions* opts) opts->controls[n_controls] = NULL; } else if ((*argv)[a][1] == 'd') { opts->dump = true; + } else if ((*argv)[a][1] == 't') { + opts->trace = true; } else if ((*argv)[a][1] == 'n') { if (++a == *argc) { fprintf(stderr, "Missing argument for -n\n"); diff --git a/src/jalv_gtk.c b/src/jalv_gtk.c index 141eee5..28c2a96 100644 --- a/src/jalv_gtk.c +++ b/src/jalv_gtk.c @@ -176,6 +176,8 @@ jalv_init(int* argc, char*** argv, JalvOptions* opts) "Load state from preset", "URI" }, { "dump", 'd', 0, G_OPTION_ARG_NONE, &opts->dump, "Dump plugin <=> UI communication", NULL }, + { "trace", 't', 0, G_OPTION_ARG_NONE, &opts->trace, + "Print trace messages from plugin", NULL }, { "show-hidden", 's', 0, G_OPTION_ARG_NONE, &opts->show_hidden, "Show controls for ports with notOnGUI property on generic UI", NULL }, { "no-menu", 'n', 0, G_OPTION_ARG_NONE, &opts->no_menu, diff --git a/src/jalv_internal.h b/src/jalv_internal.h index 54eb95b..dcd396a 100644 --- a/src/jalv_internal.h +++ b/src/jalv_internal.h @@ -94,6 +94,7 @@ typedef struct { uint32_t buffer_size; ///< Plugin <= >UI communication buffer size double update_rate; ///< UI update rate in Hz int dump; ///< Dump communication iff true + int trace; ///< Print trace log iff true int generic_ui; ///< Use generic UI iff true int show_hidden; ///< Show controls for notOnGUI ports int no_menu; ///< Hide menu iff true @@ -36,7 +36,7 @@ jalv_vprintf(LV2_Log_Handle handle, { // TODO: Lock Jalv* jalv = (Jalv*)handle; - if (type == jalv->urids.log_Trace && !jalv->opts.dump) { + if (type == jalv->urids.log_Trace && !jalv->opts.trace) { return 0; } return vfprintf(stderr, fmt, ap); |