Codebase list python-castellan / f1df6f4
Merge "Add some documentation on enabling logging" Jenkins authored 8 years ago Gerrit Code Review committed 8 years ago
1 changed file(s) with 20 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
0 ========
0 =====
11 Usage
2 ========
2 =====
33
44 This document describes some of the common usage patterns for Castellan. When
55 incorporating this package into your applications, care should be taken to
163163 options.set_defaults(cfg.CONF, api_class='some.other.KeyManager')
164164 manager = key_manager.API()
165165
166 Logging from within Castellan
167 -----------------------------
168
169 Castellan uses ``oslo_log`` for logging. Log information will be generated
170 if your application has configured the ``oslo_log`` module. If your
171 application does not use ``oslo_log`` then you can enable default logging
172 using ``enable_logging`` in the ``castellan.options`` module.
173
174 **Example. Enabling default logging.**
175
176 .. code:: python
177
178 from castellan import options
179 from castellan import key_manager
180
181 options.enable_logging()
182 manager = key_manager.API()
183
166184 Generating sample configuration files
167185 -------------------------------------
168186