本文整理匯總了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)
示例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)
示例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)
示例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)