X-Git-Url: https://git.distorted.org.uk/~mdw/hippotat/blobdiff_plain/f85d143fe449d69d6f611fcd388191a80bdfc415..ec2c9312c36782c61b38e1c3bcdbe932685a9794:/hippotatlib/__init__.py diff --git a/hippotatlib/__init__.py b/hippotatlib/__init__.py index feb7894..7bdf4ea 100644 --- a/hippotatlib/__init__.py +++ b/hippotatlib/__init__.py @@ -567,7 +567,8 @@ def common_startup(process_cfg): def ds_default(od,os,dl,op): global debug_set - debug_set = set(dfs_less_detailed(debug_def_detail)) + debug_set.clear + debug_set |= set(dfs_less_detailed(debug_def_detail)) def ds_select(od,os, spec, op): for it in spec.split(','): @@ -633,13 +634,14 @@ just `+': all DFLAGs. try: (pss, pcs) = _cfg_process_putatives() - process_cfg(pss, pcs) + process_cfg(opts, pss, pcs) except (configparser.Error, ValueError): traceback.print_exc(file=sys.stderr) print('\nInvalid configuration, giving up.', file=sys.stderr) sys.exit(12) - #print(repr(debug_set), file=sys.stderr) + + #print('X', debug_set, file=sys.stderr) log_formatter = twisted.logger.formatEventAsClassicLogText stdout_obs = twisted.logger.FileLogObserver(sys.stdout, log_formatter) @@ -648,12 +650,13 @@ just `+': all DFLAGs. stdsomething_obs = twisted.logger.FilteringLogObserver( stderr_obs, [pred], stdout_obs ) - log_observer = twisted.logger.FilteringLogObserver( + global file_log_observer + file_log_observer = twisted.logger.FilteringLogObserver( stdsomething_obs, [LogNotBoringTwisted()] ) #log_observer = stdsomething_obs twisted.logger.globalLogBeginner.beginLoggingTo( - [ log_observer, crash_on_critical ] + [ file_log_observer, crash_on_critical ] ) def common_run():