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


Python settings.LOGGING_CONFIG属性代码示例

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


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

示例1: setup

# 需要导入模块: from django.conf import settings [as 别名]
# 或者: from django.conf.settings import LOGGING_CONFIG [as 别名]
def setup(set_prefix=True):
    """
    Configure the settings (this happens as a side effect of accessing the
    first setting), configure logging and populate the app registry.
    Set the thread-local urlresolvers script prefix if `set_prefix` is True.
    """
    from django.apps import apps
    from django.conf import settings
    from django.urls import set_script_prefix
    from django.utils.log import configure_logging

    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
    if set_prefix:
        set_script_prefix(
            '/' if settings.FORCE_SCRIPT_NAME is None else settings.FORCE_SCRIPT_NAME
        )
    apps.populate(settings.INSTALLED_APPS) 
开发者ID:reBiocoder,项目名称:bioforum,代码行数:19,代码来源:__init__.py

示例2: setup

# 需要导入模块: from django.conf import settings [as 别名]
# 或者: from django.conf.settings import LOGGING_CONFIG [as 别名]
def setup(set_prefix=True):
    """
    Configure the settings (this happens as a side effect of accessing the
    first setting), configure logging and populate the app registry.
    Set the thread-local urlresolvers script prefix if `set_prefix` is True.
    """
    from django.apps import apps
    from django.conf import settings
    from django.urls import set_script_prefix
    from django.utils.encoding import force_text
    from django.utils.log import configure_logging

    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
    if set_prefix:
        set_script_prefix(
            '/' if settings.FORCE_SCRIPT_NAME is None else force_text(settings.FORCE_SCRIPT_NAME)
        )
    apps.populate(settings.INSTALLED_APPS) 
开发者ID:Yeah-Kun,项目名称:python,代码行数:20,代码来源:__init__.py

示例3: setup

# 需要导入模块: from django.conf import settings [as 别名]
# 或者: from django.conf.settings import LOGGING_CONFIG [as 别名]
def setup():
    """
    Configure the settings (this happens as a side effect of accessing the
    first setting), configure logging and populate the app registry.
    """
    from django.apps import apps
    from django.conf import settings
    from django.utils.log import configure_logging

    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
    apps.populate(settings.INSTALLED_APPS) 
开发者ID:lanbing510,项目名称:GTDWeb,代码行数:13,代码来源:__init__.py

示例4: configure_logger

# 需要导入模块: from django.conf import settings [as 别名]
# 或者: from django.conf.settings import LOGGING_CONFIG [as 别名]
def configure_logger(conf=None, **kwargs):
    from django.conf import settings
    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) 
开发者ID:007gzs,项目名称:dingtalk-django-example,代码行数:5,代码来源:celery.py


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