Exemplo n.º 1
0
    False:
    cfg.get('warnings', 'output', default='stdout').split(','),
    True: []
}[cfg.getboolean('warnings', 'suppress', default=False)],
                     btlevels=warnings_btlevels,
                     btdefault=warnings_bt,
                     maxcount=warnings_maxcount)

if __debug__:
    from mvpa2.base.verbosity import DebugLogger
    # NOTE: all calls to debug must be preconditioned with
    # if __debug__:

    debug = __Singleton(
        "debug",
        DebugLogger(
            handlers=cfg.get('debug', 'output', default='stdout').split(',')))

    # set some debugging matricses to report
    # debug.register_metric('vmem')

    # List agreed sets for debug
    debug.register('PY',
                   "No suppression of various warnings (numpy, scipy) etc.")
    debug.register('VERBOSE', "Verbose control debugging")
    debug.register('DBG', "Debug output itself")
    debug.register('STDOUT', "To decorate stdout with debug metrics")
    debug.register('DOCH', "Doc helpers")
    debug.register('INIT', "Just sequence of inits")
    debug.register('RANDOM', "Random number generation")
    debug.register('EXT', "External dependencies")
    debug.register('EXT_', "External dependencies (verbose)")
Exemplo n.º 2
0
warning = WarningLog(
    handlers={
        False: cfg.get('warnings', 'output', default='stdout').split(','),
        True: []}[cfg.getboolean('warnings', 'suppress', default=False)],
    btlevels=warnings_btlevels,
    btdefault=warnings_bt,
    maxcount=warnings_maxcount
    )


if __debug__:
    from mvpa2.base.verbosity import DebugLogger
    # NOTE: all calls to debug must be preconditioned with
    # if __debug__:

    debug = __Singleton("debug", DebugLogger(
        handlers=cfg.get('debug', 'output', default='stdout').split(',')))

    # set some debugging matricses to report
    # debug.register_metric('vmem')

    # List agreed sets for debug
    debug.register('PY', "No suppression of various warnings (numpy, scipy) etc.")
    debug.register('VERBOSE', "Verbose control debugging")
    debug.register('DBG', "Debug output itself")
    debug.register('STDOUT', "To decorate stdout with debug metrics")
    debug.register('DOCH', "Doc helpers")
    debug.register('INIT', "Just sequence of inits")
    debug.register('RANDOM', "Random number generation")
    debug.register('EXT', "External dependencies")
    debug.register('EXT_', "External dependencies (verbose)")
    debug.register('TEST', "Debug unittests")