Add an enhanced debug configuration technique to caching guide

We often have operators ask why cache logging isn't included in their
logs despite setting `keystone.conf [DEFAULT] debug=True`. This is
because cache logging requires additional configuration that isn't
obvious unless your familiar with oslo.cache and dogpile already.

This commit adds a section to the caching guide that shows people how to
update their configuration files when they need to debug caching issues.

Change-Id: I33d37366ea9caf320f3738db637dea7386ff6448
This commit is contained in:
Lance Bragstad 2020-06-29 09:47:58 -05:00
parent e3bd1d747d
commit 63e1181294

View File

@ -201,3 +201,23 @@ The following example shows how to configure the memcached back end:
You need to specify the URL to reach the ``memcached`` instance with the
``backend_argument`` parameter.
Verbose cache logging
---------------------
We do not recommend using verbose cache logging by default in production
systems since it's extremely noisy. However, you may need to debug cache
issues. One way to see how keystone is interacting with a cache backend is to
enhance logging. The following configuration will aggregate oslo and dogpile
logs into keystone's log file with increased verbosity:
.. code-block:: ini
[DEFAULT]
default_log_levels = oslo.cache=DEBUG,dogpile.core.dogpile=DEBUG
[cache]
debug_cache_backend = True
These logs will include cache hits and misses, making it easier to diagnose
cache configuration and connectivity issues.