summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDolph Mathews <dolph.mathews@gmail.com>2012-03-19 14:49:18 -0500
committerDolph Mathews <dolph.mathews@gmail.com>2012-03-19 16:33:00 -0500
commitee577163e32b88ca1345124c96ae3113d9a5ccdd (patch)
tree7099288e9afd730b0bd79059480cd1fa10139175
parent83bc8c088ec66a858afce9a889a4407c59b9d48e (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--.gitignore2
-rw-r--r--etc/keystone.conf2
-rw-r--r--etc/logging.conf.sample23
3 files changed, 6 insertions, 21 deletions
diff --git a/.gitignore b/.gitignore
index 7dfd4366..264b4019 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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