Add some documentation on enabling logging

This patch adds documentation on how to enable logging.
Related-Bug: #1521265

Change-Id: Ib0a84bcf1af12a5b489cee8abcb4231f8e34151e
This commit is contained in:
“Fernando 2015-12-01 00:01:17 -06:00
parent b018f15e2e
commit 96df616023

View File

@ -1,6 +1,6 @@
========
=====
Usage
========
=====
This document describes some of the common usage patterns for Castellan. When
incorporating this package into your applications, care should be taken to
@ -164,6 +164,24 @@ configuration.**
options.set_defaults(cfg.CONF, api_class='some.other.KeyManager')
manager = key_manager.API()
Logging from within Castellan
-----------------------------
Castellan uses ``oslo_log`` for logging. Log information will be generated
if your application has configured the ``oslo_log`` module. If your
application does not use ``oslo_log`` then you can enable default logging
using ``enable_logging`` in the ``castellan.options`` module.
**Example. Enabling default logging.**
.. code:: python
from castellan import options
from castellan import key_manager
options.enable_logging()
manager = key_manager.API()
Generating sample configuration files
-------------------------------------