quvi/debug: Check LIBQUVI_SCRIPTS_VERBOSE env. variable
commit4476269e8125a047e4d49a652d1d2f518ce35c8b
authorToni Gundogdu <legatvs@gmail.com>
Mon, 14 Jan 2013 12:57:50 +0000 (14 14:57 +0200)
committerToni Gundogdu <legatvs@gmail.com>
Mon, 14 Jan 2013 13:14:58 +0000 (14 15:14 +0200)
tree489a90f66c8b932dcfe3ecaab62215baef9e01ee
parentf060b2dd6f43fa5723713e0b9634779047493c78
quvi/debug: Check LIBQUVI_SCRIPTS_VERBOSE env. variable

Instead of relying for the library to check the environment value for
LIBQUVI_SCRIPTS_VERBOSE and set the qargs.verbose flag, have the 'say'
function check the value.

quvi_new would initially check the value, but this caused problems with
programs that would first call quvi_new and then set the env. variable
value.  Most programs will require the quvi_t handle (returned by
quvi_new) to enable the libcURL verbose output.

Another possibility was to have the library check the env. variable
value when it calls each script (ident, parse, export, ...) and then set
the qargs.verbose flag. This, however, would result in overhead even
when the debug facility (quvi/debug) was not used by a script.

Signed-off-by: Toni Gundogdu <legatvs@gmail.com>
share/common/quvi/debug.lua