diff options
| author | Dolph Mathews <dolph.mathews@gmail.com> | 2012-03-19 14:49:18 -0500 |
|---|---|---|
| committer | Dolph Mathews <dolph.mathews@gmail.com> | 2012-03-19 16:33:00 -0500 |
| commit | ee577163e32b88ca1345124c96ae3113d9a5ccdd (patch) | |
| tree | 7099288e9afd730b0bd79059480cd1fa10139175 | |
| parent | 83bc8c088ec66a858afce9a889a4407c59b9d48e (diff) | |
Improved file logging example (bug 959610)
- Root logger w/ file handler will log WARNING, ERROR, CRITICAL by default
Change-Id: I36cd07cec85712640daa013563401a3bc52f290c
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | etc/keystone.conf | 2 | ||||
| -rw-r--r-- | etc/logging.conf.sample | 23 |
3 files changed, 6 insertions, 21 deletions
@@ -5,7 +5,7 @@ vendor .venv .tox keystone.egg-info/ -run_tests.log +*.log .coverage covhtml pep8.txt diff --git a/etc/keystone.conf b/etc/keystone.conf index 4e207619..bcb6a6ae 100644 --- a/etc/keystone.conf +++ b/etc/keystone.conf @@ -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 diff --git a/etc/logging.conf.sample b/etc/logging.conf.sample index 6e3d1a04..d87d3a28 100644 --- a/etc/logging.conf.sample +++ b/etc/logging.conf.sample @@ -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 |
