Improved file logging example (bug 959610)
- Root logger w/ file handler will log WARNING, ERROR, CRITICAL by default Change-Id: I36cd07cec85712640daa013563401a3bc52f290c
This commit is contained in:
parent
83bc8c088e
commit
ee577163e3
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,7 +5,7 @@ vendor
|
||||
.venv
|
||||
.tox
|
||||
keystone.egg-info/
|
||||
run_tests.log
|
||||
*.log
|
||||
.coverage
|
||||
covhtml
|
||||
pep8.txt
|
||||
|
@ -6,7 +6,7 @@ admin_token = ADMIN
|
||||
compute_port = 8774
|
||||
verbose = True
|
||||
debug = True
|
||||
#log_config = /etc/keystone/logging.conf
|
||||
#log_config = ./etc/logging.conf.sample
|
||||
|
||||
# ================= Syslog Options ============================
|
||||
# Send logs to syslog (/dev/log) instead of to file specified
|
||||
|
@ -1,5 +1,5 @@
|
||||
[loggers]
|
||||
keys=root,api,registry,combined
|
||||
keys=root
|
||||
|
||||
[formatters]
|
||||
keys=normal,normal_with_name,debug
|
||||
@ -8,23 +8,8 @@ keys=normal,normal_with_name,debug
|
||||
keys=production,file,devel
|
||||
|
||||
[logger_root]
|
||||
level=NOTSET
|
||||
handlers=devel
|
||||
|
||||
[logger_api]
|
||||
level=DEBUG
|
||||
handlers=devel
|
||||
qualname=glance-api
|
||||
|
||||
[logger_registry]
|
||||
level=DEBUG
|
||||
handlers=devel
|
||||
qualname=glance-registry
|
||||
|
||||
[logger_combined]
|
||||
level=DEBUG
|
||||
handlers=devel
|
||||
qualname=glance-combined
|
||||
level=WARNING
|
||||
handlers=file
|
||||
|
||||
[handler_production]
|
||||
class=handlers.SysLogHandler
|
||||
@ -36,7 +21,7 @@ args=(('localhost', handlers.SYSLOG_UDP_PORT), handlers.SysLogHandler.LOG_USER)
|
||||
class=FileHandler
|
||||
level=DEBUG
|
||||
formatter=normal_with_name
|
||||
args=('glance.log', 'w')
|
||||
args=('keystone.log', 'a')
|
||||
|
||||
[handler_devel]
|
||||
class=StreamHandler
|
||||
|
Loading…
Reference in New Issue
Block a user