sphinx: better logging and verbosity handling
authorKrisztian Litkey <kli@iki.fi>
Sun, 25 May 2014 22:16:55 +0000 (01:16 +0300)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Wed, 4 Jun 2014 12:57:34 +0000 (15:57 +0300)
commitf97e6767bbda21d25eaeb77f69148085c282b557
treeaee3c42d1c71b330525f0ec68d9670291976279e
parent30586c51d5422a714842c89192f77fd931093690
sphinx: better logging and verbosity handling

Allow sphinx verbosity and logfile to be controlled by the
sphinx.verbose boolean and sphinx.log string keys. Also if
sphinx.log is set to 'srs', turn verbosity on and log sphinx
messages as murphy debug messages. sphinx warnings are turned
into murphy warnings and the rest (errors, critical errors
and fatal errors) are turned into murphy error messages.

Because we only get the originating file name and the line
number but not the function name where the message was
generated we have to cheat a bit and use 'sphinx' as the file
name and the file name as the originating function name. As a
consequence, you can see all sphinx INFO messages as murphy
debug messages by using the -d @sphinx command line option if
you have set sphinx.log to 'srs' in the config file (or have
passed -s 'sphinx.log=srs' to the daemon on the command line).
src/Makefile.am
src/plugins/speech-to-text/sphinx/decoder-set.c
src/plugins/speech-to-text/sphinx/logger.c [new file with mode: 0644]
src/plugins/speech-to-text/sphinx/logger.h [new file with mode: 0644]
src/plugins/speech-to-text/sphinx/options.c
src/plugins/speech-to-text/sphinx/sphinx-plugin.c
src/plugins/speech-to-text/sphinx/sphinx-plugin.h