aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-10-10 18:11:53 +0000
committerDavid Robillard <d@drobilla.net>2015-10-10 18:11:53 +0000
commit22ea5330650ab1f3cd59367f3ed63e1009a4d736 (patch)
tree304ab810f8778f164c3703945576fc5268bc53e2
parentfecfdd11d369541bafdd89d23871cacc0f80b1b4 (diff)
downloadjalv-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
-rw-r--r--NEWS3
-rw-r--r--doc/jalv.114
-rw-r--r--doc/jalv.gtk.16
-rw-r--r--src/jalv_console.c5
-rw-r--r--src/jalv_gtk.c2
-rw-r--r--src/jalv_internal.h1
-rw-r--r--src/log.c2
7 files changed, 24 insertions, 9 deletions
diff --git a/NEWS b/NEWS
index 23a145f..ceba30f 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ jalv (1.4.7) unstable;
* Set Jack port order metadata
* Allow Jack client name to be set from command line (thanks Adam Avramov)
* Add command prompt to console version for changing controls
+ * Add option to enable plugin trace log messages
* Exit on Jack shutdown (Patch from Robin Gareus)
* Report Jack latency (Patch from Robin Gareus)
* Exit GUI versions on interrupt
@@ -13,7 +14,7 @@ jalv (1.4.7) unstable;
* Use moc-qt4 if present for systems with multiple Qt versions
* Add Qt5 version
- -- David Robillard <d@drobilla.net> Fri, 09 Oct 2015 22:58:33 -0400
+ -- David Robillard <d@drobilla.net> Sat, 10 Oct 2015 14:11:00 -0400
jalv (1.4.6) stable;
diff --git a/doc/jalv.1 b/doc/jalv.1
index a196c01..6c3a951 100644
--- a/doc/jalv.1
+++ b/doc/jalv.1
@@ -1,4 +1,4 @@
-.TH JALV 1 "19 Apr 2012"
+.TH JALV 1 "10 Oct 2015"
.SH NAME
.B jalv \- Run an LV2 plugin as a JACK application (console version).
@@ -9,7 +9,7 @@
.SH OPTIONS
.TP
-\fB\-h\fR, \fB\-\-help\fR
+\fB\-h\fR
Print the command line options.
.TP
@@ -21,18 +21,22 @@ Print control output changes to stdout.
Set control value (e.g. "vol=1.4").
.TP
-\fB\-u UUID\fR, \fB\-\-uuid UUID\fR
+\fB\-u UUID\fR
UUID for Jack session restoration.
.TP
-\fB\-l DIR\fR, \fB\-\-load DIR\fR
+\fB\-l DIR\fR
Load state from state directory.
.TP
-\fB\-d\fR, \fB\-\-dump\fR
+\fB\-d\fR
Dump plugin <=> UI communication.
.TP
+\fB\-t\fR
+Print trace messages from plugin
+
+.TP
\fB\-b SIZE\fR
Buffer size for plugin <=> UI communication.
diff --git a/doc/jalv.gtk.1 b/doc/jalv.gtk.1
index c3e8f2b..20428bf 100644
--- a/doc/jalv.gtk.1
+++ b/doc/jalv.gtk.1
@@ -1,4 +1,4 @@
-.TH JALV.GTK "19 Apr 2012"
+.TH JALV.GTK "10 Oct 2015"
.SH NAME
.B jalv.gtk \- Run an LV2 plugin as a JACK application (Gtk version).
@@ -33,6 +33,10 @@ Load state from state directory.
Dump plugin <=> UI communication.
.TP
+\fB\-t\fR, \fB\-\-trace\fR
+Print trace messages from plugin.
+
+.TP
\fB\-b SIZE\fR
Buffer size for plugin <=> UI communication.
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
diff --git a/src/log.c b/src/log.c
index 9bc71ef..e4b5a8b 100644
--- a/src/log.c
+++ b/src/log.c
@@ -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);