openstack(essex)配置文件--local_settings.py
2013-01-07 16:07
459 查看
1.local_settings.py
/etc/openstack-dashboard/local_settings.py
/usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py
这两个文件是一个,用ll查看第二个,指向第一个
一:调试信息
from django.utils.translation import ugettext_lazy as _
Verbose= True
DEBUG = True
TEMPLATE_DEBUG = DEBUG
PROD = False
USE_SSL = False
其中Verbose 和DEBUG控制开发中页面错误会否抛出
二。
LOGGING = {
'version': 1,
# When set to True this will disable all logging except
# for loggers specified in this configuration dictionary. Note that
# if nothing is specified here and disable_existing_loggers is True,
# django.db.backends will still log unless it is disabled explicitly.
'disable_existing_loggers': True,#False,
'handlers': {
'null': {
'level': 'DEBUG',
'class': 'django.utils.log.NullHandler',
},
'console': {
# Set the level to "DEBUG" for verbose output logging.
'level': 'INFO',#'DEBUG',#'INFO',设置点1
'class': 'logging.StreamHandler',
},
},
'loggers': {
# Logging from django.db.backends is VERY verbose, send to null
# by default.
'django.db.backends': {
'handlers': ['null'],
'propagate': False,
},
'horizon': {
'handlers': ['console'],
'propagate': False, 设置点2
},
'novaclient': {
'handlers': ['console'],
'propagate': False,
},
'keystoneclient': {
'handlers': ['console'],
'propagate': False,
},
'nose.plugins.manager': {
'handlers': ['console'],
'propagate': False,
}
}
}
1.设置点1默认是INFO,如果设置成DEBUG,REQ , RESP, REQ BODY,RESP BODY日志都将打印出来,例如:
Creating a new keystoneclient connection to http://192.168.240.102:35357/v2.0.
DEBUG:horizon.api.keystone:Creating a new keystoneclient connection to http://192.168.240.102:35357/v2.0.
[Fri Jan 11 10:04:27 2013] [error] REQ: curl -i http://192.168.240.102:35357/v2.0/tokens -X POST -H "User-Agent: python-keystoneclient" -H "Content-Type: application/json" -H "X-Auth-Token: 4737b700e17c43e197976d3dfae8d721"
[Fri Jan 11 10:04:27 2013] [error]
[Fri Jan 11 10:04:27 2013] [error] REQ BODY: {"auth": {"token": {"id": "4737b700e17c43e197976d3dfae8d721"}, "tenantId": "f5d66aa3625e44149f671ab7d015bd5f"}}
[Fri Jan 11 10:04:27 2013] [error]
[Fri Jan 11 10:04:27 2013] [error] RESP: {'date': 'Fri, 11 Jan 2013 02:04:27 GMT', 'transfer-encoding': 'chunked', 'status': '200', 'vary': 'X-Auth-Token', 'content-type': 'application/json'}
[Fri Jan 11 10:04:27 2013] [error] RESP BODY: {"access": {"token": {"expires": "2013-01-11T07:52:12Z", "id": "54084645af4d4ca0ba515c363a512eeb", "tenant": {"description": null, "enabled": true, "id": "f5d66aa3625e44149f671ab7d015bd5f", "name": "admin"}}, "serviceCatalog":
[{"endpoints": [{"adminURL": "http://192.168.240.102:8774/v2/f5d66aa3625e44149f671ab7d015bd5f", "region": "RegionOne", "internalURL": "http://192.168.240.102:8774/v2/f5d66aa3625e44149f671ab7d015bd5f",
"publicURL": "http://192.168.240.102:8774/v2/f5d66aa3625e44149f671ab7d015bd5f"}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://192.168.240.102:9292/v1",
"region": "RegionOne", "internalURL": "http://192.168.240.102:9292/v1", "publicURL": "http://192.168.240.102:9292/v1"}], "endpoints_links": [], "type": "image", "name":
"glance"}, {"endpoints": [{"adminURL": "http://192.168.240.102:8776/v1/f5d66aa3625e44149f671ab7d015bd5f", "region": "RegionOne", "internalURL": "http://192.168.240.102:8776/v1/f5d66aa3625e44149f671ab7d015bd5f",
"publicURL": "http://192.168.240.102:8776/v1/f5d66aa3625e4。。。。
2.设置点2,默认False,设置成True
DEBUG:horizon.api.keystone:Creating a new keystoneclient connection to http://192.168.240.102:35357/v2.0.
DEBUG:horizon.api.nova:novaclient connection created using token "4737b700e17c43e197976d3dfae8d721" and url "http://192.168.240.102:8774/v2/f5d66aa3625e44149f671ab7d015bd5f"
这样的日志都会出来
这些日志的打印开关在NovaClient/client.py中
def http_log
/etc/openstack-dashboard/local_settings.py
/usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py
这两个文件是一个,用ll查看第二个,指向第一个
一:调试信息
from django.utils.translation import ugettext_lazy as _
Verbose= True
DEBUG = True
TEMPLATE_DEBUG = DEBUG
PROD = False
USE_SSL = False
其中Verbose 和DEBUG控制开发中页面错误会否抛出
二。
LOGGING = {
'version': 1,
# When set to True this will disable all logging except
# for loggers specified in this configuration dictionary. Note that
# if nothing is specified here and disable_existing_loggers is True,
# django.db.backends will still log unless it is disabled explicitly.
'disable_existing_loggers': True,#False,
'handlers': {
'null': {
'level': 'DEBUG',
'class': 'django.utils.log.NullHandler',
},
'console': {
# Set the level to "DEBUG" for verbose output logging.
'level': 'INFO',#'DEBUG',#'INFO',设置点1
'class': 'logging.StreamHandler',
},
},
'loggers': {
# Logging from django.db.backends is VERY verbose, send to null
# by default.
'django.db.backends': {
'handlers': ['null'],
'propagate': False,
},
'horizon': {
'handlers': ['console'],
'propagate': False, 设置点2
},
'novaclient': {
'handlers': ['console'],
'propagate': False,
},
'keystoneclient': {
'handlers': ['console'],
'propagate': False,
},
'nose.plugins.manager': {
'handlers': ['console'],
'propagate': False,
}
}
}
1.设置点1默认是INFO,如果设置成DEBUG,REQ , RESP, REQ BODY,RESP BODY日志都将打印出来,例如:
Creating a new keystoneclient connection to http://192.168.240.102:35357/v2.0.
DEBUG:horizon.api.keystone:Creating a new keystoneclient connection to http://192.168.240.102:35357/v2.0.
[Fri Jan 11 10:04:27 2013] [error] REQ: curl -i http://192.168.240.102:35357/v2.0/tokens -X POST -H "User-Agent: python-keystoneclient" -H "Content-Type: application/json" -H "X-Auth-Token: 4737b700e17c43e197976d3dfae8d721"
[Fri Jan 11 10:04:27 2013] [error]
[Fri Jan 11 10:04:27 2013] [error] REQ BODY: {"auth": {"token": {"id": "4737b700e17c43e197976d3dfae8d721"}, "tenantId": "f5d66aa3625e44149f671ab7d015bd5f"}}
[Fri Jan 11 10:04:27 2013] [error]
[Fri Jan 11 10:04:27 2013] [error] RESP: {'date': 'Fri, 11 Jan 2013 02:04:27 GMT', 'transfer-encoding': 'chunked', 'status': '200', 'vary': 'X-Auth-Token', 'content-type': 'application/json'}
[Fri Jan 11 10:04:27 2013] [error] RESP BODY: {"access": {"token": {"expires": "2013-01-11T07:52:12Z", "id": "54084645af4d4ca0ba515c363a512eeb", "tenant": {"description": null, "enabled": true, "id": "f5d66aa3625e44149f671ab7d015bd5f", "name": "admin"}}, "serviceCatalog":
[{"endpoints": [{"adminURL": "http://192.168.240.102:8774/v2/f5d66aa3625e44149f671ab7d015bd5f", "region": "RegionOne", "internalURL": "http://192.168.240.102:8774/v2/f5d66aa3625e44149f671ab7d015bd5f",
"publicURL": "http://192.168.240.102:8774/v2/f5d66aa3625e44149f671ab7d015bd5f"}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://192.168.240.102:9292/v1",
"region": "RegionOne", "internalURL": "http://192.168.240.102:9292/v1", "publicURL": "http://192.168.240.102:9292/v1"}], "endpoints_links": [], "type": "image", "name":
"glance"}, {"endpoints": [{"adminURL": "http://192.168.240.102:8776/v1/f5d66aa3625e44149f671ab7d015bd5f", "region": "RegionOne", "internalURL": "http://192.168.240.102:8776/v1/f5d66aa3625e44149f671ab7d015bd5f",
"publicURL": "http://192.168.240.102:8776/v1/f5d66aa3625e4。。。。
2.设置点2,默认False,设置成True
DEBUG:horizon.api.keystone:Creating a new keystoneclient connection to http://192.168.240.102:35357/v2.0.
DEBUG:horizon.api.nova:novaclient connection created using token "4737b700e17c43e197976d3dfae8d721" and url "http://192.168.240.102:8774/v2/f5d66aa3625e44149f671ab7d015bd5f"
这样的日志都会出来
这些日志的打印开关在NovaClient/client.py中
def http_log
相关文章推荐
- openstack(essex)配置文件--settings.py
- django应用找不到settings配置文件,但settings.py文件确实存在的问题
- Django settings.py配置文件
- django logging在settings.py文件里配置 .
- 我和Django那些事儿(5)----站点管理和静态文件配置urls.py和settings.py
- django settings.py 配置文件
- django logging在settings.py文件里配置
- Python爬虫系列之----Scrapy(六)settings.py配置文件详解
- Django的配置文件(settings.py)
- openstack(essex)配置文件--nova.conf
- django静态文件配置settings.py
- Django自带日志 settings.py文件配置
- maven全局配置文件settings.xml详解
- ASP.NET 2.0 遍历配置文件中的appSettings connectionStrings
- maven settings.xml配置文件详解
- 配置rc.local开机自启动文件的疑问
- maven的配置文件settings.xml
- Django安全配置(settings.py)详解
- django项目培训站-09-所有应用归为一个目录的配置-pycharm与settings.py中-前情回顾
- Flask config.py 项目加载配置文件