diff options
author | David Robillard <d@drobilla.net> | 2022-05-30 21:44:38 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-08-17 13:50:34 -0400 |
commit | 237bea29faafa801cec1af034458c5a85e4d134f (patch) | |
tree | 1b08d917a2ec6e73644350179d35cdd6695e8d92 /src/jack.c | |
parent | ee969b8c279200ead703448ff063fd6941e362ae (diff) | |
download | jalv-237bea29faafa801cec1af034458c5a85e4d134f.tar.gz jalv-237bea29faafa801cec1af034458c5a85e4d134f.tar.bz2 jalv-237bea29faafa801cec1af034458c5a85e4d134f.zip |
Use a consistent interface for error/warning/debug logging
Towards the ability to hook the log into other things (for display in a UI, for
example). The implementation still just prints to stderr, although now with
consistent formatting.
Diffstat (limited to 'src/jack.c')
-rw-r--r-- | src/jack.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -274,7 +274,7 @@ jack_process_cb(jack_nframes_t nframes, void* data) ev->size = sizeof(float); *(float*)(ev + 1) = port->control; if (zix_ring_write(jalv->plugin_events, buf, sizeof(buf)) < sizeof(buf)) { - fprintf(stderr, "Plugin => UI buffer overflow!\n"); + jalv_log(JALV_LOG_ERR, "Plugin => UI buffer overflow!\n"); } } } @@ -510,7 +510,7 @@ jack_initialize(jack_client_t* const client, const char* const load_init) { const size_t args_len = strlen(load_init); if (args_len > JACK_LOAD_INIT_LIMIT) { - fprintf(stderr, "error: Too many arguments given\n"); + jalv_log(JALV_LOG_ERR, "Too many arguments given\n"); return -1; } @@ -562,7 +562,7 @@ jack_finish(void* const arg) Jalv* const jalv = (Jalv*)arg; if (jalv) { if (jalv_close(jalv)) { - fprintf(stderr, "Failed to close Jalv\n"); + jalv_log(JALV_LOG_ERR, "Failed to close Jalv\n"); } free(jalv); |