当前位置: 首页>>代码示例>>Python>>正文


Python LogOptions.set_disk_log_level方法代码示例

本文整理汇总了Python中twitter.common.log.options.LogOptions.set_disk_log_level方法的典型用法代码示例。如果您正苦于以下问题:Python LogOptions.set_disk_log_level方法的具体用法?Python LogOptions.set_disk_log_level怎么用?Python LogOptions.set_disk_log_level使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在twitter.common.log.options.LogOptions的用法示例。


在下文中一共展示了LogOptions.set_disk_log_level方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setup_class

# 需要导入模块: from twitter.common.log.options import LogOptions [as 别名]
# 或者: from twitter.common.log.options.LogOptions import set_disk_log_level [as 别名]
 def setup_class(cls):
     cls.LOG_DIR = tempfile.mkdtemp()
     LogOptions.set_log_dir(cls.LOG_DIR)
     LogOptions.set_disk_log_level("DEBUG")
     log.init("executor_logger")
     if not cls.PANTS_BUILT and "SKIP_PANTS_BUILD" not in os.environ:
         assert subprocess.call(["./pants", "src/main/python/apache/aurora/executor/bin:thermos_runner"]) == 0
         cls.PANTS_BUILT = True
开发者ID:mkacik,项目名称:incubator-aurora,代码行数:10,代码来源:test_thermos_task_runner.py

示例2: setup_class

# 需要导入模块: from twitter.common.log.options import LogOptions [as 别名]
# 或者: from twitter.common.log.options.LogOptions import set_disk_log_level [as 别名]
 def setup_class(cls):
   cls.LOG_DIR = tempfile.mkdtemp()
   LogOptions.set_log_dir(cls.LOG_DIR)
   LogOptions.set_disk_log_level('DEBUG')
   log.init('executor_logger')
   if not cls.PANTS_BUILT and 'SKIP_PANTS_BUILD' not in os.environ:
     assert subprocess.call(["./pants", "binary",
         "src/main/python/apache/thermos/bin:thermos_runner"]) == 0
     cls.PANTS_BUILT = True
开发者ID:benley,项目名称:aurora,代码行数:11,代码来源:test_thermos_task_runner.py

示例3: setup_class

# 需要导入模块: from twitter.common.log.options import LogOptions [as 别名]
# 或者: from twitter.common.log.options.LogOptions import set_disk_log_level [as 别名]
 def setup_class(cls):
   cls.LOG_DIR = tempfile.mkdtemp()
   LogOptions.set_log_dir(cls.LOG_DIR)
   LogOptions.set_disk_log_level('DEBUG')
   log.init('executor_logger')
   if not cls.PEX_PATH:
     pex_dir = tempfile.mkdtemp()
     assert subprocess.call(["./pants", "--pants-distdir=%s" % pex_dir, "binary",
         "src/main/python/apache/thermos/runner:thermos_runner"]) == 0
     cls.PEX_PATH = os.path.join(pex_dir, 'thermos_runner.pex')
开发者ID:AltanAlpay,项目名称:aurora,代码行数:12,代码来源:test_thermos_task_runner.py

示例4: FakeConfig

# 需要导入模块: from twitter.common.log.options import LogOptions [as 别名]
# 或者: from twitter.common.log.options.LogOptions import set_disk_log_level [as 别名]
  Result,
  ScheduleStatusResult,
  ScheduledTask,
  TaskConfig,
  TaskQuery,
)

from mox import MockObject, Replay, Verify
from pytest import raises


# Debug output helper -> enables log.* in source.
if 'UPDATER_DEBUG' in environ:
  from twitter.common import log
  from twitter.common.log.options import LogOptions
  LogOptions.set_disk_log_level('NONE')
  LogOptions.set_stderr_log_level('DEBUG')
  log.init('test_updater')

class FakeConfig(object):
  def __init__(self, role, name, env, update_config):
    self._role = role
    self._env = env
    self._name = name
    self._update_config = update_config
    self.job_config = None

  def role(self):
    return self._role

  def name(self):
开发者ID:betepahos,项目名称:incubator-aurora,代码行数:33,代码来源:test_updater.py

示例5: import

# 需要导入模块: from twitter.common.log.options import LogOptions [as 别名]
# 或者: from twitter.common.log.options.LogOptions import set_disk_log_level [as 别名]
from apache.aurora.executor.common.announcer import DefaultAnnouncerCheckerProvider
from apache.aurora.executor.common.executor_timeout import ExecutorTimeout
from apache.aurora.executor.common.health_checker import HealthCheckerProvider
from apache.aurora.executor.common.resource_manager import ResourceManagerProvider
from apache.aurora.executor.common.sandbox import DefaultSandboxProvider
from apache.aurora.executor.thermos_task_runner import (
    DefaultThermosTaskRunnerProvider,
    UserOverrideThermosTaskRunnerProvider
)
from apache.thermos.common.path import TaskPath

CWD = os.environ.get('MESOS_SANDBOX', '.')

app.configure(debug=True)
LogOptions.set_simple(True)
LogOptions.set_disk_log_level('DEBUG')
LogOptions.set_log_dir(CWD)


app.add_option(
    '--announcer-enable',
    dest='announcer_enable',
    action='store_true',
    default=False,
    help='Enable the ServerSet announcer for this executor.  Jobs must still activate using '
         'the Announcer configuration.')


app.add_option(
    '--announcer-ensemble',
    dest='announcer_ensemble',
开发者ID:davelester,项目名称:incubator-aurora,代码行数:33,代码来源:thermos_executor_main.py

示例6: setup_class

# 需要导入模块: from twitter.common.log.options import LogOptions [as 别名]
# 或者: from twitter.common.log.options.LogOptions import set_disk_log_level [as 别名]
 def setup_class(cls):
   cls.LOG_DIR = tempfile.mkdtemp()
   LogOptions.set_log_dir(cls.LOG_DIR)
   LogOptions.set_disk_log_level('DEBUG')
   log.init('executor_logger')
开发者ID:bmhatfield,项目名称:aurora,代码行数:7,代码来源:test_thermos_executor.py

示例7: print

# 需要导入模块: from twitter.common.log.options import LogOptions [as 别名]
# 或者: from twitter.common.log.options.LogOptions import set_disk_log_level [as 别名]
        app.help()
    for (command, doc) in app.get_commands_and_docstrings():
        if args[0] == command:
            print("command %s:" % command)
            print(doc)
            app.quit(0)
    print("unknown command: %s" % args[0], file=sys.stderr)


def generate_usage():
    usage = """
thermos

commands:
"""

    for (command, doc) in app.get_commands_and_docstrings():
        usage += "    " + "%-10s" % command + "\t" + doc.split("\n")[0].strip() + "\n"
    app.set_usage(usage)


LogOptions.set_disk_log_level("NONE")
LogOptions.set_stdout_log_level("INFO")
generate_usage()


proxy_main = app.main


proxy_main()
开发者ID:sumanau7,项目名称:incubator-aurora,代码行数:32,代码来源:thermos.py

示例8: print

# 需要导入模块: from twitter.common.log.options import LogOptions [as 别名]
# 或者: from twitter.common.log.options.LogOptions import set_disk_log_level [as 别名]
    DefaultThermosTaskRunnerProvider,
    UserOverrideThermosTaskRunnerProvider,
)

try:
    from mesos.native import MesosExecutorDriver
except ImportError:
    print(traceback.format_exc(), file=sys.stderr)
    MesosExecutorDriver = None


CWD = os.environ.get("MESOS_SANDBOX", ".")

app.configure(debug=True)
LogOptions.set_simple(True)
LogOptions.set_disk_log_level("DEBUG")
LogOptions.set_log_dir(CWD)

_LOGGER_TYPES = ", ".join(LoggerMode.VALUES)


app.add_option(
    "--announcer-enable",
    dest="announcer_enable",
    action="store_true",
    default=False,
    help="Enable the ServerSet announcer for this executor.  Jobs must still activate using "
    "the Announcer configuration.",
)

开发者ID:mohammadsamir,项目名称:aurora,代码行数:31,代码来源:thermos_executor_main.py


注:本文中的twitter.common.log.options.LogOptions.set_disk_log_level方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。