def SetupToolLogging(debug, verbose, threadname=False,
                     toolname=None, logfile=pathutils.LOG_TOOLS):
  if not toolname:
    toolname = "unspecified_tool"

  # 'SetupLogging' takes a quite unintuitive 'debug' option that
  # is '0' for 'log higher than debug level' and '1' for
  # 'log at NOSET' level. Hence this conversion.
  debug_int = 0
  if debug:
    debug_int = 1

  SetupLogging(logfile,
               program=toolname,
               debug=debug_int,
               multithreaded=threadname,
               verbose=verbose)
Run tests in docstrings
dataset/ETHPy150Open ganeti/ganeti/lib/utils/log.py/SetupToolLogging--crossover with--dataset/ETHPy150Open jcbagneris/fms/fms/contrib/coleman/agents/smartmem5trader.py/_test