From 96df616023a784bd872df7c2dcac75b98153a7f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CFernando?= Date: Tue, 1 Dec 2015 00:01:17 -0600 Subject: [PATCH] Add some documentation on enabling logging This patch adds documentation on how to enable logging. Related-Bug: #1521265 Change-Id: Ib0a84bcf1af12a5b489cee8abcb4231f8e34151e --- doc/source/usage.rst | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/doc/source/usage.rst b/doc/source/usage.rst index e7a196a7..9fdd0e60 100644 --- a/doc/source/usage.rst +++ b/doc/source/usage.rst @@ -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 -------------------------------------