tvhlog: stop full debug by default if --trace specified

Often I want to enable trace (and debug) for a specific set of subsys,
but I had it configured to enable ALL debug if any debug related options
were spec'd (for compat). But this was a PITA and I kept doing
--trace blah --debug none just to get around it!
This commit is contained in:
Adam Sutton 2013-12-04 23:28:29 +00:00
parent 321d6b35bf
commit f6f79ad413

View file

@ -586,7 +586,8 @@ main(int argc, char **argv)
if (isatty(2))
log_options |= TVHLOG_OPT_DECORATE;
if (opt_stderr || opt_syslog || opt_logpath) {
log_debug = "all";
if (!opt_log_trace && !opt_log_debug)
log_debug = "all";
log_level = LOG_DEBUG;
if (opt_stderr)
log_options |= TVHLOG_OPT_DBG_STDERR;