Improve logging configuration docs...

This commit is contained in:
jaypipes@gmail.com 2011-04-26 16:10:33 -07:00
parent 8d10e637db
commit 4db9df77d0

@ -66,8 +66,7 @@ Configuring Logging in Glance
-----------------------------
There are a number of configuration options in Glance that control how Glance
servers log messages. The configuration options can be specified both on the
command line and in the ``glance.conf`` config file.
servers log messages.
* ``--log-config=PATH``
@ -77,30 +76,33 @@ Specified on the command line only.
Takes a path to a configuration file to use for configuring logging.
* ``--log-format``
Logging Options Available in ``glance.conf``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
`Because of a bug in the PasteDeploy package, this option is only available
on the command line.`
You will want to place the different logging options **in each of the API and registry
application sections in your glance.conf**. As an example, you might do the following::
Optional. Default: ``%(asctime)s %(levelname)8s [%(name)s] %(message)s``
[app:glance-api]
... other options ...
log_file = /var/log/glance/api.log
The format of the log records. See the
`logging module <http://docs.python.org/library/logging.html>`_ documentation for
more information on setting this format string.
[app:glance-registry]
... other options ...
log_file = /var/log/glance/registry.log
* ``log_file`` (``--log-file`` when specified on the command line)
* ``log_file``
The filepath of the file to use for logging messages from Glance's servers. If
missing, the default is to output messages to ``stdout``, so if you are running
Glance servers in a daemon mode (using ``glance-control``) you should make
sure that the ``log_file`` option is set appropriately.
* ``log_dir`` (``--log-dir`` when specified on the command line)
* ``log_dir``
The filepath of the directory to use for log files. If not specified (the default)
the ``log_file`` is used as an absolute filepath.
* ``log_date_format`` (``--log-date-format`` when specified from the command line)
* ``log_date_format``
The format string for timestamps in the log output.